frame_preceding

frame_preceding() -> frame

Specifies a cumulative time frame for a window context, where the frame is all the rows from the beginning of the current query window to the current row.

Equivalent to frame_exact(start: query_start_time(), ahead:0s)

Domain

This is a scalar function (calculates a single output value for a single input row).

Categories

Examples

make_col cumulative_sum:window(sum(load), frame_preceding())

Compute the cumulative sum of the load for the current query window.