SQL query: SUM values up to the current record

Posted by djeidot on Stack Overflow See other posts from Stack Overflow or by djeidot
Published on 2010-05-04T09:45:48Z Indexed on 2010/05/04 9:48 UTC
Read the original article Hit count: 167

Filed under:
|
|

Basically, having this table:

12.10
 2.35
21.45
35.26

I want to, in each record, calculate the sum of all previous records, like this:

12.10 | 12.10
 2.35 | 14.45
21.45 | 35.90
35.26 | 71.16

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server