SQL 14 : LEETCODE QUESTIONS
D
Qubits of DPK
April 1, 2026
Core DBMS
Here is a clean list of important LeetCode SQL questions with their numbers.
These cover almost everything from your 11 SQL modules (Basics → Joins → Aggregates → Subqueries → Window Functions → Schema thinking).
SQL Basics / CRUD
- #175 Combine Two Tables - COMPLETED
- #176 Second Highest Salary - COMPLETED
- #177 Nth Highest Salary - COMPLETED
- #181 Employees Earning More Than Their Managers - COMPLETED
- #182 Duplicate Emails - COMPLETED
- #183 Customers Who Never Order - COMPLETED
- #196 Delete Duplicate Emails - COMPLETED
- #197 Rising Temperature - COMPLETED
- #584 Find Customer Referee - COMPLETED
- #595 Big Countries - COMPLETED
Joins
- #607 Sales Person - COMPLETED
- #608 Tree Node - COMPLETED
- #610 Triangle Judgement
- #612 Shortest Distance in a Plane
- #619 Biggest Single Number
- #620 Not Boring Movies
- #626 Exchange Seats
- #1321 Restaurant Growth
- #1393 Capital Gain/Loss
Aggregations
- #586 Customer Placing the Largest Number of Orders
- #511 Game Play Analysis I
- #512 Game Play Analysis II
- #534 Game Play Analysis III
- #550 Game Play Analysis IV
- #570 Managers with at Least 5 Direct Reports
- #577 Employee Bonus
- #585 Investments in 2016
- #602 Friend Requests II: Who Has the Most Friends
Joins + Aggregations
- #1045 Customers Who Bought All Products
- #1075 Project Employees I
- #1076 Project Employees II
- #1084 Sales Analysis III
- #1097 Game Play Analysis V
Subqueries
- #180 Consecutive Numbers
- #184 Department Highest Salary
- #185 Department Top Three Salaries
- #262 Trips and Users
- #601 Human Traffic of Stadium
Window Functions
- #178 Rank Scores
- #1164 Product Price at a Given Date
- #1204 Last Person to Fit in the Bus
- #1174 Immediate Food Delivery II
- #1193 Monthly Transactions I
- #1211 Queries Quality and Percentage
Advanced SQL
- #534 Game Play Analysis III
- #569 Median Employee Salary
- #571 Find Median Given Frequency of Numbers
- #574 Winning Candidate
- #579 Find Cumulative Salary of an Employee
Good Practice Problems (Real Interview Style)
- #608 Tree Node
- #626 Exchange Seats
- #1321 Restaurant Growth
- #1179 Reformat Department Table
- #1398 Customers Who Bought Products A and B but Not C
Total
Approximately 50 high-quality SQL questions.
These cover:
sql
QUBITS OF DPK
Which is exactly what backend interviews test.