Welcome to my personal collection of SQL solutions for LeetCode problems! This repository is dedicated to helping me — and others — practice and master SQL by tackling real interview-style questions.
📌 What you’ll find here ✅ Fully solved SQL problems with clean, readable queries.
📖 Explanations & comments for each solution so it’s easy to revisit and revise.
🧩 Examples covering a range of SQL concepts, including:
Basic SELECT, WHERE, ORDER BY
JOINs (INNER, LEFT, RIGHT, FULL)
GROUP BY, HAVING, aggregation functions (SUM, AVG, COUNT, MAX, MIN)
Subqueries & nested SELECTs
Window functions (RANK, DENSE_RANK, ROW_NUMBER)
Common table expressions (CTEs) where supported
Handling NULLs, DISTINCT, and advanced filtering