Phase 4 · SQL & Databases

Topics

Window Functions

Part of the Data Science Roadmap.

Summary

Functions like ROW_NUMBER, RANK, and running totals that calculate across a set of related rows without collapsing them the way GROUP BY does — extremely useful for building time-aware features.

How to Learn This

  • 1Use ROW_NUMBER() to find the most recent event per user.
  • 2Practice a running total or moving average using SUM()/AVG() OVER (ORDER BY ...).
  • 3Learn PARTITION BY — the key to most window function power.
InsideEdge

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — free on the InsideEdge app.

Download
InsideEdge