首页 > 代码库 > 分析函数

分析函数

分析函数
row_number() over(partition by a order by b) order_id
dense_rank() over(partition by a order by  b) order_id
rank() over()(partition by a order by b)      order_id

                   row_number             dense_rank         rank

2001               1                                 1                             1

2002               2                                  2                            2

2002               3                                  2                            2

2003                4                                 3                            4

分析函数