Skip to content
Prev 311623 / 398503 Next

Using cumsum with 'group by' ?

id  time  x cumsumXById
1   1 12:01  5           5
2   1 12:02 14          19
3   1 12:03  6          25
4   1 12:04  3          28
5   2 12:01 98          98
6   2 12:02 23         121
7   2 12:03  1         122
8   2 12:04  4         126
9   3 12:01  5           5
10  3 12:02 65          70
11  3 12:03 23          93
12  3 12:04 23         116

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com