Oracle
 sql >> Database >  >> RDS >> Oracle

Ottieni la riga superiore dopo l'ordine in Oracle Subquery

prova questo

select * from
  (SELECT id, name, department, age, score,
  ROW_NUMBER() OVER (partition by department order by age desc, score asc) srlno 
  FROM student) 
where srlno = 1;