Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 1.37 KB

File metadata and controls

50 lines (33 loc) · 1.37 KB

LeetCode SQL Questions and Solutions

LeetCode SQL

This repository contains LeetCode SQL solutions organized by difficulty and documented as Markdown files.

Repository Structure

  • easy/
  • medium/
  • hard/

Each solution file is named with the LeetCode question number and title, for example:

  • easy/1050. Actors and Directors Who Cooperated At Least Three Times.md
  • medium/176. Second Highest Salary.md
  • hard/262. Trips and Users.md

What Each Solution Includes

Each Markdown solution document typically contains:

  • the LeetCode problem link
  • the problem description
  • table schema details
  • sample input and expected output
  • the SQL solution
  • a short breakdown of the query logic

Problem Statement References

Problem statements, including premium questions, can be referenced from:

  1. https://leetcode.ca
  2. https://lifewithdata.com/sql
  3. https://www.jiakaobo.com/leetcode

Notes

  1. Table names in the SQL queries are suffixed with the question number.
  2. The repository is now documentation-oriented, so solutions are stored as .md files instead of standalone .sql files.
  3. New solutions can be added in the same Markdown format as more problems are covered.

Other Resources

Miscellaneous SQL repository: https://github.com/cM2908/misc-sql

SQL blog: http://chintan-sql.blogspot.com