码迷,mamicode.com
首页 > 其他好文 > 详细

常用开窗函数

时间:2020-06-26 13:07:50      阅读:87      评论:0      收藏:0      [点我收藏+]

标签:over   order by   max   常用   lag   order   fir   函数   art   

ROW_NUMBER() OVER(PARTITION BY ... ORDER BY ...)
RANK() OVER(PARTITION BY ... ORDER BY ...)
DENSE_RANK() OVER(PARTITION BY ... ORDER BY ...)
COUNT() OVER(PARTITION BY ... ORDER BY ...)
MAX() OVER(PARTITION BY ... ORDER BY ...)
MIN() OVER(PARTITION BY ... ORDER BY ...)
SUM() OVER(PARTITION BY ... ORDER BY ...)
AVG() OVER(PARTITION BY ... ORDER BY ...)
FIRST_VALUE() OVER(PARTITION BY ... ORDER BY ...)
LAST_VALUE() OVER(PARTITION BY ... ORDER BY ...)
LAG() OVER(PARTITION BY ... ORDER BY ...)
LEAD() OVER(PARTITION BY ... ORDER BY ...)

 

常用开窗函数

标签:over   order by   max   常用   lag   order   fir   函数   art   

原文地址:https://www.cnblogs.com/WaitSani/p/13194270.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!