Skip to content

Repository files navigation

📊 LeetCode SQL 50 — Study Plan Solutions

Solutions to LeetCode's SQL 50 study plan, solved daily and pushed automatically via LeetHub.


🚀 About

This repository tracks my progress through LeetCode's SQL 50 study plan — a curated set of 50 problems covering the core SQL concepts needed for interviews: joins, subqueries, aggregation, window functions, and string/date manipulation.

  • 🗓️ Solving daily
  • 🔁 Auto-synced from LeetCode via LeetHub
  • 🎯 Goal: complete all 50 problems

📈 Progress

Progress


🗂️ Problems

# Title Difficulty Topics Solution
1 Recyclable and Low Fat Products Easy Filtering Solution
2 Find Customer Referee Easy Filtering
3 Big Countries Easy Filtering
4 Article Views I Easy Filtering
5 Invalid Tweets Easy Filtering
6 Replace Employee ID With The Unique Identifier Easy Joins
7 Product Sales Analysis I Easy Joins
8 Customer Who Visited but Did Not Make Any Transactions Easy Joins
9 Rising Temperature Easy Joins
10 Average Time of Process per Machine Easy Joins
11 Employee Bonus Easy Joins
12 Students and Examinations Easy Joins
13 Managers with at Least 5 Direct Reports Medium Joins
14 Confirmation Rate Easy Joins
15 Not Boring Movies Easy Basic Aggregation
16 Average Selling Price Easy Basic Aggregation
17 Project Employees I Easy Basic Aggregation
18 Percentage of Users Attended a Contest Easy Basic Aggregation
19 Queries Quality and Percentage Easy Basic Aggregation
20 Monthly Transactions I Medium Basic Aggregation
21 Immediate Food Delivery II Medium Basic Aggregation
22 Game Play Analysis IV Medium Basic Aggregation
23 Number of Unique Subjects Taught by Each Teacher Easy Sorting & Grouping
24 User Activity for the Past 30 Days I Easy Sorting & Grouping
25 Product Sales Analysis III Medium Sorting & Grouping
26 Classes More Than 5 Students Easy Sorting & Grouping
27 Find Followers Count Easy Sorting & Grouping
28 Biggest Single Number Easy Sorting & Grouping
29 Customers Who Bought All Products Medium Sorting & Grouping
30 The Number of Employees Which Report to Each Employee Easy Advanced Select & JOIN
31 Primary Department for Each Employee Easy Advanced Select & JOIN
32 Triangle Judgement Easy Advanced Select & JOIN
33 Consecutive Numbers Medium Subqueries
34 Product Price at a Given Date Medium Subqueries
35 Last Person to Fit in the Bus Medium Subqueries
36 Count Salary Categories Medium Subqueries
37 Second Highest Salary Medium Advanced String Functions / Regex / Clause
38 Group Sold Products By The Date Easy Advanced String Functions / Regex / Clause
39 List the Products Ordered in a Period Easy Advanced String Functions / Regex / Clause
40 Find Users With Valid E-Mails Easy Advanced String Functions / Regex / Clause
41 Patients With a Condition Easy Advanced String Functions / Regex / Clause
42 Delete Duplicate Emails Easy Advanced String Functions / Regex / Clause
43 Rearrange Products Table Easy Advanced String Functions / Regex / Clause
44 Fix Names in a Table Easy Advanced String Functions / Regex / Clause
45 Nth Highest Salary Medium Advanced String Functions / Regex / Clause
46 Employees Earning More Than Their Managers Easy Advanced String Functions / Regex / Clause
47 Duplicate Emails Easy Advanced String Functions / Regex / Clause
48 Customers Who Never Order Easy Advanced String Functions / Regex / Clause
49 Department Highest Salary Medium Advanced String Functions / Regex / Clause
50 Exchange Seats Medium Advanced String Functions / Regex / Clause

✅ = solved · Solution column links to the folder once pushed by LeetHub.


🛠️ Tech

  • Language: SQL (MySQL dialect, as used by LeetCode)
  • Sync tool: LeetHub 2.0

📌 Notes

  • Each problem folder is auto-created by LeetHub and contains the accepted solution along with the problem statement.
  • This repo is for personal practice and tracking — solutions may not always be the most optimal, but reflect my learning process.

⭐ If you're also grinding SQL 50, feel free to fork this and track your own progress!

LeetCode Topics

Database

0176-second-highest-salary
0570-managers-with-at-least-5-direct-reports
0595-big-countries
1148-article-views-i
1484-group-sold-products-by-the-date
1527-patients-with-a-condition
1667-fix-names-in-a-table
1683-invalid-tweets

About

A collection of LeetCode questions to ace the Data Engineering interview!

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors