PARTITION BY

The part of OVER that splits rows into groups so a window calculation restarts for each group.

In more detail

Unlike GROUP BY it does not collapse the rows: every row stays and sees only its own partition. Rankings with PARTITION BY are independent per group.

Example

COUNT(*) OVER (PARTITION BY customer_id)

Related terms

Taught in

References