title: Query tuning for update of large volumes of data
body: <p>I have a huge dataset which grows everyday. There is a certain update which is run on the data for each and every row.</p>
  
  <pre><code>Table Structure :
  Id    Level   Data     Output
  --    -----   -------  --------- 
  1     1         12.3      12.3
  1     2         42.5     522.75
  1     3        129     67434.75
  2     1          3.12      3.12
  2     2          0.12      0.3744
  2     3         32.1      12.01824
  2     4         39.1     469.913184
  3     1          0.83      0.83
  3     2          4.21      3.4943
  4     1          3.49      3.49
  </code></pre>
  
  <p>For one id, the output is the multiplication of the data with the data of its previous levels [data*1 for level = 1]</p>
  
  <p>Now, there is no limit to the number of ids that are obtained each day and neither to the number of levels for each.</p>
  
  <p>Edited :: Help calculate output (values or as column) for this data set.</p>