This repository contains my solutions to SQL problems from platforms like HackerRank and LeetCode. The goal of this repository is to document my progress in learning SQL and showcase solutions for a variety of database query challenges.
The repository is organized based on the platform and difficulty level of the problems. Here's the directory structure:
SQL/
├── README.md
├── HackerRank/
│ ├── Easy/
│ │ ├── Problem1.sql
│ │ ├── Problem2.sql
│ │ └── ...
│ ├── Medium/
│ │ ├── Problem1.sql
│ │ ├── Problem2.sql
│ │ └── ...
│ └── Hard/
│ ├── Problem1.sql
│ └── ...
├── LeetCode/
│ ├── Easy/
│ │ ├── Problem1.sql
│ │ ├── Problem2.sql
│ │ └── ...
│ ├── Medium/
│ │ ├── Problem1.sql
│ │ ├── Problem2.sql
│ │ └── ...
│ └── Hard/
│ ├── Problem1.sql
│ └── ...
- Problems solved on HackerRank are divided into three categories:
- Easy
- Medium
- Hard
- Problems solved on LeetCode follow the same categorization:
- Easy
- Medium
- Hard
Each SQL file includes the following:
- Problem name and link
- The SQL query solution
Example format:
-- Problem: Select All Records
-- Platform: HackerRank
-- URL: https://www.hackerrank.com/challenges/select-all-records/problem
SELECT * FROM employees;
- Clone the repository:
git clone https://github.com/your-username/sql-solutions.git
- Navigate to the platform and difficulty level to view solutions.
These solutions are my personal implementations. Use them to learn and understand SQL concepts. Avoid copying them directly into your own submissions for coding platforms.
- Practice advanced SQL concepts such as window functions, CTEs, and optimization.
- Solve more problems on additional platforms like StrataScratch and DataLemur.
- Explore practical SQL projects to apply these skills in real-world scenarios.
Happy Querying! 🚀