表(game)
id   aaa     
1    0       
2    100
3    100 
4    100 
我要得到结果
id   aaa    bbb     
1    0      0 
2    100    100
3    100    200 
4    100    300
就是id=2时 bbb列 值是 sum(aaa) where id<2
就是id=3时 bbb列 值是 sum(aaa) where id<3
就是id=4时 bbb列 值是 sum(aaa) where id<4
观察斜对角的值相加我本来想问case但是数量最很大.有上千条
请问还有其它方法吗?