177. Nth Highest Salary


  • 0
    B

    CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT
    BEGIN
    SET N = N-1;
    RETURN (
    # Write your MySQL query statement below.
    select (
    select distinct salary
    from employee
    order by salary desc
    limit 1 offset N

      ) as 'getNthHighestSalary(N)'
    

    );
    END


Log in to reply
 

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