Write a sql query to find the 3rd highest salary of an employee from the employee table in SQL?

Discussion RoomCategory: Database&SQLWrite a sql query to find the 3rd highest salary of an employee from the employee table in SQL?
Nick asked 5 years ago

SELECT salary FROM employee e1 WHERE 3-1 = (SELECT COUNT(DISTINCT salary) FROM employee e2 WHERE e2.salary > e1.salary)

Scroll to Top