Advanced SQL for Analytics: Window Functions, CTEs and Fast Queries
Go beyond basic SQL to the queries analytical reporting really needs.
Watch the first lesson freeWelcome: Peregrine Health and the questions behind the reports · 4 minSign in to watch one lesson from this course free.
What you will be able to do
Skills you will gain
- Window frames and moving averages
- Ranking and top N per group
- CTEs and recursive queries
- Gaps and islands
- Cohort retention and funnels
- ROLLUP and GROUPING SETS
- Reading EXPLAIN ANALYZE
- PostgreSQL index design
About this course
Go beyond basic SQL to the queries analytical reporting really needs. You frame running totals and moving averages, rank inside every group, compare periods with LAG, write long queries as named CTEs, walk hierarchies with recursion, find streaks with gaps and islands, and build cohort, funnel and subtotal reports in one statement. Then you read EXPLAIN ANALYZE, choose composite, covering and partial indexes, rewrite filters the planner can use and decide when a materialized view is the better answer. Runs free on PostgreSQL 17 or later with invented clinic data.
Curriculum
Requirements
What you walk away with
Yallo AI Academy certifies completion of
Advanced SQL for Analytics: Window Functions, CTEs and Fast Queries