Skip to content

About

A complete guide to LeetCode SQL 50 with handwritten notes, visual explanations, and optimal solutions.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

28 Commits

Folders and files

Repository files navigation

LeetCode SQL 50 - Complete Solutions

SQL LeetCode Status

Star this repo


Welcome to my LeetCode SQL 50 journey!

This repository is a complete guide to mastering SQL for interviews. It includes:

  • Optimal SQL Queries (Accepted on LeetCode)
  • Line-by-line logic explanations
  • Hand-drawn Visual Notes for quick revision

Note: This repository is updated daily. If you find it helpful, please consider giving it a star!


Progress Tracker

  • 01. Select (5/5)
  • 02. Basic Joins (9/9)
  • 03. Basic Aggregate Functions (8/8)
  • 04. Sorting and Grouping (4/7)
  • 05. Advanced Select and Joins (0/7)
  • 06. Subqueries (0/7)
  • 07. Advanced String Functions (0/7)

Daily Solutions Directory

Day Problem Solved Link
Day 1 1757. Recyclable and Low Fat Products View Notes
Day 2 584. Find Customer Referee View Notes
Day 3 595. Big Countries View Notes
Day 4 1148. Article Views I View Notes
Day 5 1683. Invalid Tweets View Notes
Day 6 1378. Replace Employee ID View Notes
Day 7 1068. Product Sales Analysis I View Notes
Day 8 1581. Customer Who Visited View Notes
Day 9 197. Rising Temperature View Notes
Day 10 1661. Average Time of Process View Notes
Day 11 577. Employee Bonus View Notes
Day 12 1280. Students and Examinations View Notes
Day 13 570. Managers with 5 Reports View Notes
Day 14 1934. Confirmation Rate View Notes
Day 15 620. Not Boring Movies View Notes
Day 16 1251. Average Selling Price View Notes
Day 17 1075. Project Employees I View Notes
Day 18 1633. Percentage of Users Attended a Contest View Notes
Day 19 1211. Queries Quality and Percentage View Notes
Day 20 1193. Monthly Transactions I View Notes
Day 21 1174. Immediate Food Delivery II View Notes
Day 22 550. Game Play Analysis IV View Notes
Day 23 2356. Number of Unique Subjects Taught by Each Teacher View Notes
Day 24 1141. User Activity for the Past 30 Days I View Notes
Day 25 1070. Product Sales Analysis III View Notes
Day 26 596. Classes With at Least 5 Students View Notes

Problem List (SQL 50)

01. Select

  • 1757. Recyclable and Low Fat Products
  • 584. Find Customer Referee
  • 595. Big Countries
  • 1148. Article Views I
  • 1683. Invalid Tweets

02. Basic Joins

  • 1378. Replace Employee ID With The Unique Identifier
  • 1068. Product Sales Analysis I
  • 1581. Customer Who Visited but Did Not Make Any Transactions
  • 197. Rising Temperature
  • 1661. Average Time of Process per Machine
  • 577. Employee Bonus
  • 1280. Students and Examinations
  • 570. Managers with at Least 5 Direct Reports
  • 1934. Confirmation Rate

03. Basic Aggregate Functions

  • 620. Not Boring Movies
  • 1251. Average Selling Price
  • 1075. Project Employees I
  • 1633. Percentage of Users Attended a Contest
  • 1211. Queries Quality and Percentage
  • 1193. Monthly Transactions I
  • 1174. Immediate Food Delivery II
  • 550. Game Play Analysis IV

04. Sorting and Grouping

  • 2356. Number of Unique Subjects Taught by Each Teacher
  • 1141. User Activity for the Past 30 Days I
  • 1070. Product Sales Analysis III
  • 596. Classes With at Least 5 Students
  • 1729. Find Followers Count
  • 619. Biggest Single Number
  • 1045. Customers Who Bought All Products

05. Advanced Select and Joins

  • 1731. The Number of Employees Which Report to Each Employee
  • 1789. Primary Department for Each Employee
  • 610. Triangle Judgement
  • 180. Consecutive Numbers
  • 1164. Product Price at a Given Date
  • 1204. Last Person to Fit in the Bus
  • 1907. Count Salary Categories

06. Subqueries

  • 1978. Employees Whose Manager Left the Company
  • 626. Exchange Seats
  • 1341. Movie Rating
  • 1321. Restaurant Growth
  • 602. Friend Requests II: Who Has the Most Friends
  • 585. Investments in 2016
  • 185. Department Top Three Salaries

07. Advanced String Functions / Regex / Clause

  • 1667. Fix Names in a Table
  • 1527. Patients With a Condition
  • 196. Delete Duplicate Emails
  • 176. Second Highest Salary
  • 1484. Group Sold Products By The Date
  • 1327. List the Products Ordered in a Period
  • 1517. Find Users With Valid E-Mails

About

A complete guide to LeetCode SQL 50 with handwritten notes, visual explanations, and optimal solutions.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors