PostgreSQL逐行累加——实现账目余额报表
惊艳了同事的sum over语法~(✧◡✧)1
select sum(colA) over (partition by colB order by colC) from temp
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 珍珠巧克力!
评论
GitalkValine
惊艳了同事的sum over语法~(✧◡✧)1
select sum(colA) over (partition by colB order by colC) from temp