30-DAY SQL ROADMAP (Beginner → Advanced for Data Analysis)
WEEK 1 — SQL BASICS (Days 1–7)
Foundational concepts + must-know commands.
Day 1: Introduction to SQL
• What is SQL?
• Types of SQL (DDL, DML, DQL, DCL)
• What is a database, table, row, column?
• Install: MySQL / PostgreSQL / SQL Server / SQLite
Day 2: Basic SELECT
• SELECT
• SELECT DISTINCT
• ORDER BY
• LIMIT / TOP
Day 3: Filtering Data
• WHERE
• Comparison operators (=, <>, >, >=, <)
• Logical operators (AND, OR, NOT)
Day 4: Working with NULL
• IS NULL / IS NOT NULL
• COALESCE()
Day 5: Basic Functions
• String: LOWER, UPPER, LENGTH
• Numeric: ROUND, CEIL, FLOOR
• Date: NOW(), DATE(), YEAR()
Day 6: Sorting + Aliases
• ORDER BY
• ASC / DESC
• Aliasing columns and tables
Day 7: Mini Project
Analyze a sample dataset.
Tasks:
• Fetch top customers
• Sort by sales
• Clean missing values
• Extract month from date
WEEK 2 — SQL INTERMEDIATE (Days 8–14)
Joins + Grouping + Summarization.
Day 8: GROUP BY
• COUNT, SUM, AVG, MIN, MAX
• GROUP BY basics
Day 9: HAVING clause
• Difference between WHERE vs HAVING
• Filtering aggregates
Day 10: JOINS — Inner Join
• Understand relations between tables
• INNER JOIN with examples
Day 11: JOINS — Left, Right, Full
• LEFT JOIN
• RIGHT JOIN
• FULL JOIN
Use cases in analysis.
Day 12: Advanced JOINS
• CROSS JOIN
• SELF JOIN
• Multiple table JOIN
Day 13: Subqueries
• Subquery in SELECT
• Subquery in WHERE
• Nested subqueries
Day 14: Mini Project
Create a Sales Report:
• Total revenue
• Top 5 selling products
• Monthly revenue trend
• Customer purchase summary
WEEK 3 — ADVANCED SQL (Days 15–21)
Window functions + views + advanced transforms.
Day 15: Window Functions Intro
• OVER()
• PARTITION BY
• ORDER BY inside window
Day 16: Ranking Functions
• ROW_NUMBER()
• RANK()
• DENSE_RANK()
Day 17: Window Aggregates
• SUM() OVER
• AVG() OVER
• Moving averages
• Running totals
Day 18: LEAD & LAG
• Comparing current row with previous/next
• Use cases in time-series analysis
Day 19: CTE (WITH clause)
• Create readable layered queries
• Recursive CTE
Day 20: Views & Materialized Views
• When to use views
• Dynamic vs stored data
Day 21: Mini Project
Build a Customer Insights Dashboard (SQL-only):
• Customer ranking
• Repeat purchase analysis
• Revenue per category
• MoM growth using window functions
WEEK 4 — SQL FOR DATA ANALYSTS (Days 22–30)
Case statements, optimization, real projects.
Day 22: CASE WHEN
• IF/ELSE logic in SQL
• Categorizing data (Age groups, Revenue buckets)
Day 23: Data Cleaning in SQL
• Removing duplicates
• Handling missing values
• Standardizing text & dates
Day 24: Complex Joins + Subqueries
• Multi-step real-world queries
• Joining 4–5 tables
Day 25: SQL Performance Optimization
• Indexing basics
• Query performance
• Avoiding common slow patterns
Day 26: SQL + Analytics
• Time-series queries
• Cohort analysis
• Retention analysis
Day 27: ETL with SQL
• Extracting data
• Transforming with SQL
• Loading into tables
Day 28: Real-World Business Problems
Create SQL solutions for:
• E-commerce
• Banking
• Healthcare
• Sales CRM
• Marketing funnels
Day 29: Capstone Project
Pick any dataset (Sales, HR, Finance).
Build:
• 10–20 analytical SQL queries
• Window functions
• Joins
• Cleaning
• KPIs (revenue, churn, growth)
Day 30: Final Revision + Mock Interview
Revise:
• Joins
• Window functions
• Subqueries
• GROUP BY, HAVING
Give yourself an SQL Case-Study Test.