The moving slice of rows a window function aggregates around the current row.

A window frame decides which rows one aggregate sees

A window partition determines which rows belong together; a window frame determines which of those rows feed a frame-sensitive calculation for the current row. Confusing these boundaries can turn a running total into a repeated subtotal or make last_value return the current value when the report expected the final value in the partition. ...

February 23, 2027 · 5 min · XB Field Notes
A SQL feature that produces multiple aggregation levels from one GROUP BY clause.

GROUPING SETS build several aggregate views

GROUPING SETS asks one SQL statement to produce several aggregation levels. A sales report can return totals by region and product, region subtotals, and a grand total together. The result contains different kinds of rows, so identifying each row’s level is as important as calculating its amount correctly. ...

January 15, 2027 · 5 min · XB Field Notes