An open API service indexing awesome lists of open source software.

https://github.com/suman105/leetcode-sql-50

LeetCode SQL 50 Solutions – A curated collection of optimized SQL solutions covering essential concepts like joins, aggregations, window functions, and subqueries.
https://github.com/suman105/leetcode-sql-50

sql

Last synced: 6 months ago
JSON representation

LeetCode SQL 50 Solutions – A curated collection of optimized SQL solutions covering essential concepts like joins, aggregations, window functions, and subqueries.

Awesome Lists containing this project

README

          

# **LeetCode SQL 50 - Solutions 🚀**

Welcome to my LeetCode SQL 50 solution repository! This repository contains well-structured, optimized SQL solutions for all LeetCode SQL 50 problems, along with detailed explanations to enhance your understanding.

## 📌 **About LeetCode 75**
**LeetCode SQL 50** is a curated list of essential SQL problems designed to improve database querying skills for technical interviews, data analytics, and software development. These problems cover a broad range of SQL concepts, including **Joins**, **Aggregate Functions**, **Subqueries**, and **String Functions**.

## 📂 **Repository Structure**
The solutions are categorized based on SQL topics for easy navigation:

- **Advanced Select and Joins**
- **Advanced String Functions / Regex / Clause**
- **Basic Aggregate Functions**
- **Basic Joins**
- **Select**
- **Sorting and Grouping**
- **Subqueries**

## 📑 LeetCode SQL 50 Problem List

I have solved all LeetCode SQL 50 problems, and they are organized based on their topics. You can find the solutions in their respective folders/files.

## 🔥 **Getting Started**

### Clone the Repository
To get a local copy, use the following command:

```sh
git clone https://github.com/suman105/LeetCode-SQL-50.git
cd LeetCode-SQL-50
```

## ⚙️ **Prerequisites**
Ensure you have **[MySQL](https://www.mysql.com/downloads/)** or **[PostgreSQL](https://www.postgresql.org/download/)** installed on your system. You can use any database management system that supports SQL.

## 🖥️ **Running the SQL Queries**
You can execute the queries in your preferred SQL environment (e.g., MySQL Workbench, PostgreSQL, SQLite, or an online SQL compiler).
- To run a SQL file using MySQL command line:
```sh
mysql -u your_username -p your_database < filename.sql
```
- For PostgreSQL:
```sh
psql -U your_username -d your_database -f filename.sql
```

## 🤝 **Contributions**
Contributions are welcome! Feel free to fork this repository, suggest improvements, or add alternative solutions. To contribute:
1. Fork the repository.
2. Create a new branch.
```sh
git checkout -b feature-branch
3. Commit your changes.
```sh
git commit -am 'Add new SQL solution'
4. Push to your fork.
```sh
git push origin feature-branch
5. Open a pull request.

## ⭐ **Show Some Support**
If you find this repository helpful, consider giving it a star ⭐ on GitHub. Your support motivates me to continue improving and adding more solutions! 🚀

Happy Querying! 🖥️📊