CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT
DECLARE i INTEGER;
DECLARE output INTEGER;
SET i = N - 1;
SELECT DISTINCT Salary FROM Employee ORDER BY Salary DESC LIMIT 1 OFFSET i INTO output;
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.