Nth highest salary


  • 0
    S

    select max(Salary)'Nth highest' from Employee emp1
    where N-1=
    (select count(distinct(emp2.Salary)) from Employee emp2
    where emp2.Salary>emp1.Salary)


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.