Skip to content

This repository contains solutions to various SQL problems from LeetCode, categorized by difficulty level (Easy, Medium, Hard). Each problem is provided with a SQL script demonstrating its solution.

License

Notifications You must be signed in to change notification settings

tasniattohfa/leetcode-sql-problems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetcode-sql-problems

This repository contains solutions to various SQL problems from LeetCode.

Easy Problems

  • [175: Combine Two Tables]
  • [181: Employees Earning More Than Their Managers]
  • [182: Duplicate Emails]
  • [183: Customers Who Never Order]
  • [197: Rising Temperature]
  • [577: Employee Bonus]
  • [584: Find Customer Referee]
  • [595: Big Countries]
  • [596: Classes More Than 5 Students]
  • [610: Triangle Judgement]
  • [619: Biggest Single Number]
  • [620: Not Boring Movies]
  • [627: Swap Salary]
  • [1068: Product Sales Analysis I]
  • [1075: Project Employees I]
  • [1141. User Activity for the Past 30 Days I]
  • [1148: Article Views I]
  • [1193: Monthly Transactions I]
  • [1211: Queries Quality and Percentage]
  • [1251: Average Selling Price]
  • [1280: Students and Examinations]
  • [1378: Replace Employee ID With The Unique Identifier]
  • [1581: Customer Who Visited but Did Not Make Any Transactions]
  • [1633: Percentage of Users Attended a Contest]
  • [1661: Average Time of Process per Machine]
  • [1683: Invalid Tweets]
  • [1729: Find Followers Count]
  • [1731: The Number of Employees Which Report to Each Employee]
  • [1757: Recyclable and Low Fat Products]
  • [1789: Primary Department for Each Employee]
  • [1978: Employees Whose Manager Left the Company]
  • [2356: Number of Unique Subjects Taught by Each Teacher]

Medium Problems

  • [176: Second Highest Salary]
  • [180: Consecutive Numbers]
  • [550: Game Play Analysis IV]
  • [570: Managers with at Least 5 Direct Reports]
  • [626: Exchange Seats]
  • [1045: Customers Who Bought All Products]
  • [1070: Product Sales Analysis III]
  • [1174: Immediate Food Delivery II]
  • [1934: Confirmation Rate]

Usage

To run these SQL scripts, copy the content of the .sql file and execute it in your SQL database environment.

Contributing

Feel free to submit pull requests to add more solutions or improve existing ones.

About

This repository contains solutions to various SQL problems from LeetCode, categorized by difficulty level (Easy, Medium, Hard). Each problem is provided with a SQL script demonstrating its solution.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published