Skip to course content
Free SQL course

SQL for Data Analysis and AI

Module 07

Window Functions for Ranking, Running Totals, and Cohorts

About 80-100 minutes of guided work.

By the end of this module you can compute a total alongside the rows it came from, restart a calculation per group, choose correctly between ROW_NUMBER and RANK when values tie, and build a running total that is actually reproducible.

Units

  1. Unit 07.00: Aggregating without collapsing rows
  2. Unit 07.01: PARTITION BY: resetting the calculation per group
  3. Unit 07.02: ROW_NUMBER, RANK, and what ties do
  4. Unit 07.03: Running totals and why ORDER BY is mandatory
  5. Unit 07.04: Filtering on a window result with QUALIFY

Module work