欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

分析函数

程序员文章站 2022-03-13 23:41:22
...

分析函数 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

分析函数
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