Window functions vs GROUP BY aggregates: how they differ and when to choose each
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Explain what a SQL window function does and how it differs from an aggregate with GROUP BY, then say when each is the right tool. Tests understanding of PARTITION BY, row preservation, running totals and ranks, frames and the logical order of query execution.