Lesson 2 of 3Module 1 · 0% of course
Explore › CS, Python & AI Engineering › SQL & APIs › Talking to data
SQL & APIs · Talking to data

GROUP BY & window functions

Aggregate rows into summaries with GROUP BY/HAVING, then keep row detail while computing running totals, ranks and comparisons with window functions.

30 min · 6 steps · videoJump to quiz ↓
SQL Window Function | How to write SQL Query using RANK, DENSE RANK, LEAD/LAG | SQL Queries Tutorial techTFQ · 30 min
Open in YouTube
Step 1 of 6 · Overview30 min read ·
Key idea
Prereqs: SELECT & JOIN. Next: Indexes & query plans. CS50 SQL Lecture 0–1 aggregates + standard window functions (Postgres/SQLite 3.25+).
Next: 1. Aggregates and GROUP BY
‹ PrevNext ›