window frame

The subset of a partition that a window calculation sees for each row, such as the current row and the one before it.

In more detail

A frame of one preceding row and the current row makes a moving two-row window. The first row of a partition has no row before it, so frames are incomplete at the edges; test those boundary rows.

Example

SUM(id) OVER (ORDER BY id ROWS BETWEEN 1 PRECEDING AND CURRENT ROW)

Related terms

Taught in

References