首页 > 代码库 > row_number() over(partition by a order by b desc) rn 用法

row_number() over(partition by a order by b desc) rn 用法

row_number() over(partition by a order by b desc) rn 用法

row_number() OVER (PARTITION BY COL1 ORDER BY COL2) 表示根据COL1分组,在分组内部根据 COL2排序,而此函数计算的值就表示每组内部排序后的顺序编号(组内连续的唯一的)

 

row_number() over(partition by a order by b desc) rn 用法