Below is the sample SQL Query to find out the nth highest Salary. This question aslo asked in so many interviews also it an important SQL Query useful to find nhighest in a table sets see the query.
Below is the example from an Employee which has a salary column in it .
Q. How to find nth highest salary?
SELECT TOP 1 salary
FROM (SELECT DISTINCT TOP n salary
ORDER BY salary DESC) a
ORDER BY salary