SQL Query Interview Question: Cheat Sheet
1. Find the Second Highest Salary
SELECT MAX(e1.salary)
FROM employee e1
WHERE e1.salary < (
SELECT MAX(e2.salary)
FROM employee e2
);
2. Find the Nth Highest Salary
Option 1: Using LIMIT and
roydevashish.hashnode.dev5 min read