User Id :    Password :      New Member   Forgot Password  
Topic: How to get Nth highest salary from sql-query
Sahil Chopra
24 Feb 2011 at 04:18 AM

Hi,

Can anyone tell me how to get Nth highest salary through sql-query?

Re: How to get Nth highest salary from sql-query
Sumit Gupta
24 Feb 2011 at 04:43 AM

Use the following query to find Nth highest salary:

Select * From Employee E1 where N=(select count(distinct (E2.Salary)) from Employee E2 where E1.Salary<=E1.Salary)

Total Replies: 1
 
Featured Text Ad

Featured Ad