We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e660c3 commit f7e9beaCopy full SHA for f7e9bea
sql_solutions/177_nth_highest_salary.sql
@@ -2,9 +2,8 @@ CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT
2
BEGIN
3
SET N=N-1;
4
RETURN (
5
- # Write your MySQL query statement below.
6
Select distinct(salary) from Employee
7
Order by salary desc
8
- LIMIT 1 OFFSET N #Offset skips n rows and we can't do any calculation like n-1 here, so we had to set that out before
+ LIMIT 1 OFFSET N #Offset skips n rows and we can't do any calculation like n-1 here, so we had to set that out before
9
);
10
END
0 commit comments