Nth Highest Salary


  • 0
    W

    CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT
    BEGIN
    RETURN (
    select min(a.Salary) getNthHighestSalary from (select Salary from Employee order by Salary desc limit N) a
    );
    END


Log in to reply
 

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