How to find 3rd highest salary of an employee from the employee table in SQL?
SELECT salary FROM employee e1 WHERE 3-1 = (SELECT COUNT(DISTINCT salary) FROM employee e2 WHERE e2.salary > e1.salary)
Our updated SQL interview questions queries for freshers are the best online resource to help you prepare for the upcoming interviews.
Suggest An Answer
SELECT min(salary) FROM employee e1 WHERE salary in (SELECT top (3) FROM employee order by salary desc