Accepted Solution of Nth Highest Salary
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\n    BEGIN\n    DECLARE M INT;\n    SET M=N-1;\n      RETURN (\n        # Write your MySQL query statemen
    CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\n    BEGIN\n    DECLARE M INT;\n    SET M=N-1;\n      RETURN (\n        # Write your MySQL query statement below.\n        SELECT IFNULL((SELECT DISTINCT Salary FROM Employee ORDER BY Salary DESC LIMIT M ,1), NULL)\n      );\n    END
[]