记一次面试题: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;

posted @ 2020-09-07 16:45  最最么么哒  阅读(226)  评论(0编辑  收藏  举报