Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //approach: 1
- SELECT salary FROM Employee e1 WHERE N-1=(SELECT DISTINCT COUNT(salary) FROM Employee e2 WHERE e2.salary>e1.salary);
- ////approach: 2
- SELECT salary FROM Employee ORDER BY DESC salary LIMIT N-1, 1
Add Comment
Please, Sign In to add comment