oracle 分析函数over

前端之家收集整理的这篇文章主要介绍了oracle 分析函数over前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

drop table test111;
create table test111(
name varchar2(10),
class number,
grade number

)
select * from test111;

insert into test111 values('a',1,23);
insert into test111 values('b',213);
insert into test111 values('bb',213);
insert into test111 values('bbb',null);
insert into test111 values('c',2123);
insert into test111 values('d',2);
insert into test111 values('e',2,223);
insert into test111 values('r',2233);
insert into test111 values('t',273);
insert into test111 values('y',3,237);
insert into test111 values('u',4,2543);

select name,class,grade,sum(grade)over (partition by class order by grade desc) from test111

select name,dense_rank()over(partition by class order by grade desc) mm from test111

select name,to_char(wm_concat(grade) over (partition by class order by grade)) from test111

select name,row_number() over (partition by class order by grade) from test111

http://www.jb51.cc/article/p-yjzzpqeh-wt.html

猜你在找的Oracle相关文章