Skip to content

Commit f7e9bea

Browse files
authored
VVI
1 parent 9e660c3 commit f7e9bea

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sql_solutions/177_nth_highest_salary.sql

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT
22
BEGIN
33
SET N=N-1;
44
RETURN (
5-
# Write your MySQL query statement below.
65
Select distinct(salary) from Employee
76
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
7+
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
98
);
109
END

0 commit comments

Comments
 (0)