oracle实现组内排序,如找出我所有科目中分数最高的两门课
select * from (select t.*,row_number() over(partition by t.name order by t.scoredesc) rn
from person_score t)c where (rn = 1 or rn=2) and name='XXX';
oracle实现组内排序,如找出我所有科目中分数最高的两门课
select * from (select t.*,row_number() over(partition by t.name order by t.scoredesc) rn
from person_score t)c where (rn = 1 or rn=2) and name='XXX';