🗓 Week 1: SQL Basics & Data Retrieval
Goal: Understand core syntax, filtering, sorting, and basic aggregation.
📅 Day 1
Learn: SQL syntax, SELECT, FROM, WHERE
Practice: 10–15 queries from HackerRank/LeetCode (Basic)
📅 Day 2
Learn: ORDER BY, DISTINCT, LIMIT, ALIAS
Practice: Sorting and filtering challenges
📅 Day 3
Learn: Aggregation functions (COUNT, SUM, AVG, MAX, MIN)
Practice: Aggregation-based problems
📅 Day 4
Learn: GROUP BY, HAVING clause
Practice: Grouping and filtering aggregate queries
📅 Day 5
Learn: CASE WHEN, COALESCE, IFNULL
Practice: Conditional logic in queries
📅 Day 6
Learn: SQL functions (String, Date, Math functions)
Practice: Function-based challenges
📅 Day 7
Revise all Week 1 topics
Mock Test (choose 10 mixed problems from LeetCode or StrataScratch)
🗓 Week 2: Joins, Subqueries & Complex Queries
Goal: Develop comfort with joins, nested queries, and real-world data manipulation.
📅 Day 1
Learn: INNER JOIN, LEFT JOIN
Practice: 10 join problems (2+ tables)
📅 Day 2
Learn: RIGHT JOIN, FULL OUTER JOIN
Practice: Joins involving NULL handling
📅 Day 3
Learn: CROSS JOIN, SELF JOIN
Practice: Practice JOIN-based logic puzzles
📅 Day 4
Learn: Subqueries (in SELECT, WHERE, FROM)
Practice: Nested subquery problems
📅 Day 5
Learn: Correlated subqueries
Practice: Real-world business cases
📅 Day 6
Learn: Set operations – UNION, INTERSECT, EXCEPT
Practice: Comparison queries
📅 Day 7
Revise all joins, subqueries
Mock Test (10 LeetCode medium-level SQL)
🗓 Week 3: Window Functions, CTEs, Performance
Goal: Learn interview-heavy concepts like window functions and optimization.
📅 Day 1
Learn: OVER(), ROW_NUMBER(), RANK(), DENSE_RANK()
Practice: Top N, duplicates removal, ranking
📅 Day 2
Learn: LAG(), LEAD(), NTILE()
Practice: Time-based analysis problems
📅 Day 3
Learn: Common Table Expressions (CTEs)
Practice: Recursive & non-recursive CTEs
📅 Day 4
Learn: Performance tuning – Indexes, Explain Plan basics
Practice: Query refactoring (optimize queries)
📅 Day 5
Learn: Case studies – business dashboards, reporting queries
Practice: Real datasets (e.g., Airbnb, IMDb)
📅 Day 6
Learn: Stored procedures & transactions (intro level)
Practice: Simulate mini-ETL logic in SQL
📅 Day 7
Full Mock Interview:
o Choose 10 medium to hard LeetCode/StrataScratch problems.
o Time yourself & review solutions.