Tag archive
Commands grouped around the same concept, pattern, or recurring problem.
Accumulate a column's values row by row using `SUM` as a window function.
Use `SUM(...) OVER ()` to compare each row's value to the total without collapsing the result set.
Use `ROWS BETWEEN` in a window function to aggregate only the rows immediately surrounding each row.
Add numeric values across matching rows and return one aggregate total.