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

  1. #
    175 Combine Two Tables - COMPLETED
  2. #
    176 Second Highest Salary - COMPLETED
  3. #
    177 Nth Highest Salary - COMPLETED
  4. #
    181 Employees Earning More Than Their Managers - COMPLETED
  5. #
    182 Duplicate Emails - COMPLETED
  6. #
    183 Customers Who Never Order - COMPLETED
  7. #
    196 Delete Duplicate Emails - COMPLETED
  8. #
    197 Rising Temperature - COMPLETED
  9. #
    584 Find Customer Referee - COMPLETED
  10. #
    595 Big Countries - COMPLETED

Joins

  1. #
    607 Sales Person - COMPLETED
  2. #
    608 Tree Node - COMPLETED
  3. #
    610 Triangle Judgement
  4. #
    612 Shortest Distance in a Plane
  5. #
    619 Biggest Single Number
  6. #
    620 Not Boring Movies
  7. #
    626 Exchange Seats
  8. #
    1321 Restaurant Growth
  9. #
    1393 Capital Gain/Loss

Aggregations

  1. #
    586 Customer Placing the Largest Number of Orders
  2. #
    511 Game Play Analysis I
  3. #
    512 Game Play Analysis II
  4. #
    534 Game Play Analysis III
  5. #
    550 Game Play Analysis IV
  6. #
    570 Managers with at Least 5 Direct Reports
  7. #
    577 Employee Bonus
  8. #
    585 Investments in 2016
  9. #
    602 Friend Requests II: Who Has the Most Friends

Joins + Aggregations

  1. #
    1045 Customers Who Bought All Products
  2. #
    1075 Project Employees I
  3. #
    1076 Project Employees II
  4. #
    1084 Sales Analysis III
  5. #
    1097 Game Play Analysis V

Subqueries

  1. #
    180 Consecutive Numbers
  2. #
    184 Department Highest Salary
  3. #
    185 Department Top Three Salaries
  4. #
    262 Trips and Users
  5. #
    601 Human Traffic of Stadium

Window Functions

  1. #
    178 Rank Scores
  2. #
    1164 Product Price at a Given Date
  3. #
    1204 Last Person to Fit in the Bus
  4. #
    1174 Immediate Food Delivery II
  5. #
    1193 Monthly Transactions I
  6. #
    1211 Queries Quality and Percentage

Advanced SQL

  1. #
    534 Game Play Analysis III
  2. #
    569 Median Employee Salary
  3. #
    571 Find Median Given Frequency of Numbers
  4. #
    574 Winning Candidate
  5. #
    579 Find Cumulative Salary of an Employee

Good Practice Problems (Real Interview Style)

  1. #
    608 Tree Node
  2. #
    626 Exchange Seats
  3. #
    1321 Restaurant Growth
  4. #
    1179 Reformat Department Table
  5. #
    1398 Customers Who Bought Products A and B but Not C

Total

Approximately 50 high-quality SQL questions.
These cover:
sql
QUBITS OF DPK
1SELECT
2JOIN
3GROUP BY
4HAVING
5SUBQUERY
6WINDOW FUNCTIONS
7RELATIONAL THINKING
Which is exactly what backend interviews test.