window
xorq.api.window(
preceding=None,
following=None,
order_by=None,
group_by=None,
*,
rows=None,
range=None,
between=None,
)Create a window clause for use with window functions.
The ROWS window clause includes peer rows based on differences in row number whereas RANGE includes rows based on the differences in row value of a single order_by expression.
All window frame bounds are inclusive.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| preceding | Number of preceding rows in the window | None |
|
| following | Number of following rows in the window | None |
|
| group_by | Grouping key | None |
|
| order_by | Ordering key | None |
|
| rows | Whether to use the ROWS window clause |
None |
|
| range | Whether to use the RANGE window clause |
None |
|
| between | Automatically infer the window kind based on the boundaries | None |
Returns
| Name | Type | Description |
|---|---|---|
| Window | A window frame |