SQL Interview Questions & Practice

SQL Interview Questions & Practice is a hands-on, bite-sized series designed to help you crack real SQL interview questions with clarity and confidence.

sqlsql interview questionssql window functions

Find the 4th Highest Salary

Table Setup

1CREATE TABLE Employee (
2    id INT,
3    name VARCHAR(50),
4    salary INT
5);
6
7INSERT INTO Employee VALUES
8(1, 'A', 90000),
9(2, 'B', 80000),
10(3, 'C', 80000),
11(4, 'D', 70000),
12(5, 'E', 60000),
13(6, 'F', 50000);