query to find running total of a column
Query to Find the Running Total . i have a table with two columns date and sales . I want the output in a seperate column with the sales of one row added to the sales of other row-i.e cumulative of sales on date
Data in the Table - input format
date sales
01/04/10 -13.92
01/05/10 199
01/06/10 339.43
01/07/10 286.52
01/08/10 1210.39
01/09/10 384.35
Output Required
date sales Running total
01/04/10 -13.92 -13.92
01/05/10 199 185.08
01/06/10 339.43 524.51
01/07/10 286.52 811.03
01/08/10 1210.39 2021.42
01/09/10 384.35 2405.77
pl suggest sql query to get the above output
Regards
kavitha
Data in the Table - input format
date sales
01/04/10 -13.92
01/05/10 199
01/06/10 339.43
01/07/10 286.52
01/08/10 1210.39
01/09/10 384.35
Output Required
date sales Running total
01/04/10 -13.92 -13.92
01/05/10 199 185.08
01/06/10 339.43 524.51
01/07/10 286.52 811.03
01/08/10 1210.39 2021.42
01/09/10 384.35 2405.77
pl suggest sql query to get the above output
Regards
kavitha
0