177. Nth Highest Salary
All prompts are owned by LeetCode. To view the prompt, click the title link above.
First completed : May 22, 2024
Last updated : July 01, 2024
Related Topics : Database
Acceptance Rate : 37.96 %
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT
BEGIN
SET N = N - 1;
RETURN (
# Write your MySQL query statement below.
SELECT DISTINCT e.salary FROM Employee e ORDER BY e.salary DESC LIMIT N, 1
);
END