This repo contains all my SQL solutions from Leetcode website in order to practice my SQL programming skills. I attempted all questions in 25 days to corroborate my knowledge in SQL.
This repository serves as a self-guided tutorial for learning SQL through LeetCode database problems. Solutions are categorized by difficulty (Easy, Medium, Hard) and aim to provide not just the answer, but also an understanding of the underlying concepts.
Problems are organized into Easy/
, Medium/
, and Hard/
directories based on their LeetCode difficulty.
Each SQL problem file will eventually follow a standard format:
## Problem Title (from LeetCode)
## LeetCode Link
(Direct link to the problem)## Problem Description
(As provided by LeetCode)## SQL Solution
(The SQL code for the solution)## Explanation
(A breakdown of the solution's logic and approach)## Key Concepts
(A list of SQL concepts demonstrated in the solution) (Note: We are currently in the process of updating all files to this format. SeeDOCUMENTATION_GUIDE.md
for more details on the intended structure.)
We recommend the following approach for learning:
- Navigate to a problem in the respective difficulty folder.
- Try to solve the problem on your own first on LeetCode or your local SQL environment.
- Review the provided SQL solution in this repository.
- Read the
Explanation
section (once available) to understand the thought process and reasoning behind the solution. - Note the
Key Concepts
to reinforce your learning of specific SQL features. Link to the website is: https://leetcode.com/problemset/database/