常用开窗函数
Posted waitsani
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了常用开窗函数相关的知识,希望对你有一定的参考价值。
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 ...)
以上是关于常用开窗函数的主要内容,如果未能解决你的问题,请参考以下文章