This query finds the second highest salary from a table of employee salaries. It uses a subquery to select the top 2 highest salaries ordered descending by salary. Then it finds the minimum salary from the outer query, which will be the second highest since the highest is excluded.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
52 views1 page
SQL
This query finds the second highest salary from a table of employee salaries. It uses a subquery to select the top 2 highest salaries ordered descending by salary. Then it finds the minimum salary from the outer query, which will be the second highest since the highest is excluded.