CodingReported in a candidate post, Dec 2021
Find highest and second highest salary
Filed under Legato Health Technologies
The question
Write a SQL query to find the employee with the highest salary, and then optimize a query to find the second highest salary using correlated/nested queries instead of slow limits.
No write-up yet. Related questions below have one.
Related Legato Health Technologies questions
Collected from public candidate posts and coding forums. Updated Nov 2026.