oracle中parttion用法及作用
发布网友
发布时间:2022-04-13 01:07
我来回答
共1个回答
热心网友
时间:2022-04-13 02:36
用于分析函数
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 ...)
其中partition by ...是以...为分组 ,不是必须的
order by ... 以...排序 必须