Sunday, April 13, 2008

SQL Server

Query for finding the Highest 4 th paid employee from a table


Select * from EMployeeSalary E1 where 4-1=(Select Count(Distinct(e2.ctc)) From EMployeeSalary E2 Where E2.CTC>E1.CTC)

No comments: