Oracle
 sql >> Datenbank >  >> RDS >> Oracle

Holen Sie sich die oberste Zeile nach order by in Oracle Subquery

versuchen Sie es hier

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;