sql >> Base de Datos >  >> RDS >> Oracle

Obtenga la fila superior después de ordenar en Oracle Subquery

prueba este

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;