title: Oracle SQL: Calculate value using previous row
body: <p>I have a table with two columns: Cur_value and  Difference</p>
  
  <pre><code>       Cur_value        Difference
  (-3)       3    
  (-2)       4    
  (-1)       5    
  (1)                        1
  (2)                       -2
  (3)                        3
  (4)     
  (5)     
  (6)     
  (7)     
  </code></pre>
  
  <p>Now I want to caculate value of Cur_value from row (1) to row (7) so that  </p>
  
  <p>cur_value(t) = cur_value(t-3) + dif(t). </p>
  
  <p>It means my result is: </p>
  
  <pre><code>           Value        Difference
  (-3)           3    
  (-2)           4    
  (-1)           5    
  (1)        3 + 1           1
  (2)        4 - 2          -2
  (3)        5 + 3           3
  (4)    3 + 1 + 2           2
  (5)    4 - 2 + 1           1
  (6)    5 + 3 - 2          -2
  (7) 3 + 1 + 2 - 1         -1
  </code></pre>
  
  <p>. 
  My question is: how to do this action by single Oracle SQL statements?</p>