Skip to content

This repository contains solutions to the top 50 SQL problems on LeetCode, covering advanced string functions, regex, clauses, basic aggregation functions, joins, sorting, grouping, subqueries, and more.

Notifications You must be signed in to change notification settings

deepak14ri/LeetCode-SQL-50

Repository files navigation

LeetCode SQL TOP 50 Solutions

This repository contains solutions to the top 50 SQL problems on LeetCode, covering advanced string functions, regex, clauses, basic aggregation functions, joins, sorting, grouping, subqueries, and more.

Repository Structure

  • README.md: An overview of the repository and how to use it.
  • advanced_string_functions_regex_clauses.sql: Solutions for advanced string functions, regex, and clause-based problems.
  • basic_aggregation_function.sql: Solutions focusing on basic aggregation functions like COUNT, SUM, AVG, etc.
  • basic_join.sql: Solutions demonstrating various types of SQL joins (INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN).
  • select.sql: Basic SELECT statement solutions.
  • sorting_and_group.sql: Solutions for sorting and grouping data using ORDER BY and GROUP BY.
  • subqueries.sql: Solutions involving subqueries.

How to Use This Repository

  1. Clone this repository to your local machine.
  2. Open each SQL file in a text editor or IDE that supports SQL syntax highlighting.
  3. Review the provided solutions and explanations.
  4. Try solving the problems on your own before looking at the solutions.
  5. Use these solutions as a reference or learning tool to improve your SQL skills.

Latest Commit

Author: deepak14ri
Commit Message: new problem solved
Latest Commit Hash: b6bce78
Date: 12 hours ago

History

  • SELECT: Basic SELECT statement solutions to retrieve data from one or more tables.
  • BASIC AGGREGATION FUNCTION: Solutions for filtering employee information using basic aggregation functions.
  • BASIC JOIN: Demonstrates various join techniques to combine rows from two or more tables based on a related column.
  • SORTING AND GROUP: Solutions for sorting and grouping employee information.
  • SUBQUERIES: Solutions involving subqueries to perform operations within a query.
  • ADVANCED STRING FUNCTIONS + REGEX + CLAUSE: Solutions for problems requiring advanced string manipulation, regular expressions, and specific SQL clauses.

Contributing

Contributions are welcome Please feel free to submit a pull request if you have improvements or additional solutions.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

This repository contains solutions to the top 50 SQL problems on LeetCode, covering advanced string functions, regex, clauses, basic aggregation functions, joins, sorting, grouping, subqueries, and more.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published