Foundations

SQL Window Functions

Solve ranking, funnels, retention, and cohort prompts with clean analytical SQL.

Recommended on day 2390 minutesIntermediate

Learning objectives

  • Choose between joins, CTEs, and windows for readability and performance
  • Implement ranking, rolling aggregates, and funnel analysis
  • Avoid double-counting errors in multi-step event datasets

Interview prompts

  • How would you compute day-7 retention for a signup cohort?
  • What mistakes create duplicate counts in funnel queries?