Hi! Welcome to my SQL learning repo 👋
When I first started learning SQL, I struggled to understand tables, joins, and figure out what the output would actually look like. I’d read tutorials, try queries somewhere, and then lose track of everything. That’s exactly why I made this repo: a single place to document everything I learn, step by step.
Here, you’ll find notes, examples, exercises, and a roadmap from beginner to advanced topics.
Learn, practice, and explore SQL while having a little fun along the way! 🌞
1️⃣ SQL Basics - SELECT, FROM, WHERE, ORDER BY, DISTINCT, LIMIT
2️⃣ Data Filtering & Logical Operators - AND / OR, IN, NOT IN, BETWEEN, LIKE, IS NULL
3️⃣ Aggregation - COUNT, SUM, AVG, MIN/MAX, GROUP BY, HAVING
4️⃣ Joins - INNER, LEFT, RIGHT, FULL OUTER, SELF JOIN
5️⃣ Window Functions - ROW_NUMBER, RANK, DENSE_RANK, LAG, LEAD, SUM/AVG OVER, PARTITION BY
6️⃣ Subqueries & CTE - WITH CTE, nested SELECTs, correlated subqueries
7️⃣ Data Cleaning - COALESCE, TRIM, LOWER/UPPER, CAST/CONVERT
8️⃣ Date & Time Functions - DATE, EXTRACT, DATE_DIFF/TIMESTAMPDIFF, CURRENT_DATE/NOW, DATE_TRUNC
💡 Tip: Each topic includes clear examples with output tables to help you understand what happens and why.
Alongside these notes, I actively practice SQL problems to solidify my understanding.
Check out my SQL Practice Questions repo for exercises and solutions: sql-practice-questions
This helps me apply the concepts I learn and tackle queries similar to real-world product analytics questions.
Here are some of the resources I frequently use:
- W3Schools SQL – quick syntax reference
- SQL Tutorial – easy-to-follow explanations
- SQLBolt – interactive lessons and exercises
If you find this repo helpful, or want to follow my SQL learning journey - give it a ⭐ !