1.分组求和:
sum(字段) over(patition by 字段)
2. 连续求和:
sum(字段) over(order by 字段)
3.分组排序编号:
row_number(字段) over(partition by 字段, order by 字段)
4.分组合计:
group by ROLLUP(字段)
本文共 212 字,大约阅读时间需要 1 分钟。
1.分组求和:
sum(字段) over(patition by 字段)
2. 连续求和:
sum(字段) over(order by 字段)
3.分组排序编号:
row_number(字段) over(partition by 字段, order by 字段)
4.分组合计:
group by ROLLUP(字段)
转载于:https://my.oschina.net/chenhao901007/blog/355699