running total

A total that grows row by row, adding each row's value to the sum of all rows before it.

In more detail

SUM(x) OVER (ORDER BY key) computes it in one query. The ORDER BY inside OVER decides what counts as before, so it should be unique or ties will share a total.

Related terms

Taught in

References