PARTITION BY splits the input into separate groups before numbering starts.
partition by region
Make groups
The compiler finds 2 partitions.
partitions=2
Window-function examples are tiny finite table transforms; SQL dialects, NULL ordering, frames beyond prefix rows, optimizer behavior, performance, and product behavior are out of scope.
Read each group
The partition table lists the source rows that belong to each group.