Posted (Amit) in General on 01-09-2009
Tags: MySQL
This query lets you find the nth highest salaries employees.
Select * From @Table [T1] Where
(2 = (Select Count(Distinct [ESalary]) From @Table [T2] where [T1]।[ESalary] <= [T2].[ESalary]))
Replace 2 with 3,4 ,5,6 etc to get the 3,4 ,5,6 etc highest salaried employees
[...] This post was Twitted by amityadav [...]