title: how to do a iterative rollup in sql
body: <p>Hi I want to do a rolling sum (of valx) based on previous row value of rolling sum(valy) and the current row value of valx</p>
  
  <p>valy=previousrow_valy + valx</p>
  
  <pre><code>animal valx valy 
  cat    1    1 
  cat    3    4 
  cat    2    6 
  dog    4    4 
  dog    6    10 
  dog    7    17 
  dog    8    25 
  </code></pre>