记一次面试题:SQL实现到当前月总量和

https://blog.csdn.net/weixin_39043567/article/details/90612526

select name,mon,amount,
sum(amount) over(partition by name order by mon rows between unbounded preceding and current row) as account
from monamount;

原文地址:https://www.cnblogs.com/zuizui1204/p/13627739.html