这题遇到一个新知识
sum(a) over (order by b)
即对于

b-----a
1-----2
3-----1
2-----3
结果:
b-----a
1-----2
2-----2+3
3-----2+3+1