Window Functions — Roadmap Step & Resources
Running totals, rankings and row-by-row comparisons without collapsing rows
- Level: intermediate
- Estimated time: 2 days
- Roadmap: Data Science
Before this step
Mini projects
- Write a query using RANK() and LAG() to find each customer's month-over-month change
Interview questions
- How does a window function differ from a regular GROUP BY aggregation?
Study resources
- SQL Window Functions (Article) — The official PostgreSQL documentation's tutorial on window functions.
- SQL Window Functions Explained (Video) — A practical tutorial on ROW_NUMBER, RANK and other window functions.
Part of
- SQL & Databases — section
- Data Science roadmap — the full learning path