Fractal Interview Question

SQL query to find the second highest salary in an employee database.

Interview Answer

Anonymous

Sep 25, 2024

Use ORDER BY DESC and LIMIT 2 OFFSET 1 Alternatively, use subqueries to find the MAX salary greater than the overall maximum salary