Data and AI
Learn SQL for Analytics
2 plans — 13 lessons
Window functions, CTEs, advanced JOINs, query optimization, and indexing for real analytics work.
What You'll Learn
Window functions
Use ROW_NUMBER, RANK, LAG, LEAD, and running totals over partitions.
CTEs and recursive queries
Build readable query chains and traverse hierarchies with recursive CTEs.
Advanced JOINs and set operations
Use CROSS JOIN, FULL OUTER, EXCEPT, and INTERSECT for complex data merges.
Subqueries and correlated subqueries
Write efficient scalar and correlated subqueries to answer multi-step questions.
Query optimization fundamentals
Read EXPLAIN output and rewrite queries to avoid full scans.
Indexing strategies
Choose between B-tree, hash, and composite indexes to speed up queries.
Capstone: analytics data mart
Design and query a star-schema data mart for business reporting.
Query data like an analyst
7 days of joins, aggregates, CTEs, and KPI patterns — get answers from data without waiting for anyone.
Start learningI used to ask our data team for every report. Now I write the queries myself. This plan changed my workflow.
