How to get Nth highest salary from table in a MySQL?
Use the below MySQL query to get Nth highest salary from table in a MySQL.
SELECT * FROM EmployeeTable1 AS Emp1 WHERE (1) =
( SELECT COUNT(DISTINCT(Emp2.amount)) FROM EmployeeTable2
AS Emp2 WHERE Emp2.amount > Emp1.amount)
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.