window function

A calculation across a set of rows related to the current row that, unlike GROUP BY, keeps every input row in the answer.

In more detail

Adding OVER to a function turns it into a window function, so each order row can carry its customer's order count or a running total. That replaces fetching rows and looping over them in application code, and saves round trips.

Related terms

Taught in

References