Skip to content

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

License

Notifications You must be signed in to change notification settings

suman105/LeetCode-SQL-50

Repository files navigation

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:

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

⚙️ Prerequisites

Ensure you have MySQL or PostgreSQL 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:
mysql -u your_username -p your_database < filename.sql
  • For PostgreSQL:
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.
    git checkout -b feature-branch
  3. Commit your changes.
    git commit -am 'Add new SQL solution'
  4. Push to your fork.
    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! 🖥️📊

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published