0
点赞
收藏
分享

微信扫一扫

mysql中获取累计数据

梦想家们 2022-02-08 阅读 51

有较长一段时间没写SQL,最近快速的捡起遗忘的一些点
语法:

sum(字段1) over(partition by 字段2 order by 字段3 rows between unbounded preceding and current row) as 新字段名

参考:
https://blog.csdn.net/weixin_43332500/article/details/105033468

举报

相关推荐

0 条评论