Oracle
 sql >> Base de Dados >  >> RDS >> Oracle

Obtenha a linha superior após o pedido no Oracle Subquery


tente 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;