Solutions to LeetCode's SQL 50 study plan, solved daily and pushed automatically via LeetHub.
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
| # | 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.
- Language: SQL (MySQL dialect, as used by LeetCode)
- Sync tool: LeetHub 2.0
- 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!