sql 逐行累加
sql 逐行累加,包括当前行
select name,sl, sum(sl) over(partition by name order by name rows between unbounded preceding and current row) as accumulate from test;
可以实现在窗口中进行逐行累加
select uid,month,amount,
sum(amount) over(partition by uid order by month rows between unbounded preceding and current row) as accumulate
from t_access_tmp;
恋花望月轻轻唱 听雨随风悄悄追