I have previously written SQL SERVER – Query to Retrieve the Nth Maximum value. I just received email that if I can write this using AdventureWorks database as it is default sample database for SQL Server 2005 and user can run the query against it and understand it better.
Here is query to find Nth Highest Record from Database Table.
USE AdventureWorks; GO SELECT * FROM HumanResources.EmployeePayHistory E1 WHERE (4-1) = (SELECT COUNT(DISTINCT(E2.Rate)) FROM HumanResources.EmployeePayHistory E2 WHERE E2.Rate > E1.Rate) GO
Reference : Pinal Dave (http://blog.SQLAuthority.com)