我有一个包含以下字段的表:
season, collection, product_key, units_sold
我想添加额外的
cumulative_sold column(aggreate of previous rows values)
应该满足order by season, collection,units_sold
sample input
----------
ss,f1,1,3
ss,f1,2,4
ss,f1,3,4
ss,f2,1,1
ss,f2,5,1
expected output
--------------
ss,f1,1,3,3
ss,f1,2,4,7(3+4)
ss,f1,3,4,11(3+4+4)
ss,f2,1,1,1
ss,f2,5,1,2(1+1)