Intermediate
SQL
Q53 / 100
What does a window function with "OVER (PARTITION BY column)" do, e.g. "SUM(amount) OVER (PARTITION BY dept)"?
Correct! Well done.
Incorrect.
The correct answer is B) It computes the aggregate (e.g. sum) across rows within each partition (group) while still returning a row for each individual record, unlike GROUP BY which collapses rows
B
Correct Answer
It computes the aggregate (e.g. sum) across rows within each partition (group) while still returning a row for each individual record, unlike GROUP BY which collapses rows
Explanation
Window functions compute values across a set of related rows (the "window" or partition) without collapsing the result into one row per group, preserving the original row-level granularity.
Progress
53/100