Find Nth Highest Salary Employees Table

Find the Nth highest salary from the employees table.

sql

SELECT DISTINCT salary FROM employees ORDER BY salary DESC LIMIT 1 OFFSET N-1;

This query retrieves the Nth highest salary by sorting the distinct salary values in descending order and using the LIMIT and OFFSET clauses to select the specific row corresponding to the Nth position.

PromptDB can make mistakes. Please double-check responses.