[]
Window functions calculate their result based on a sliding window frame, a set of rows that are somehow related to the current row. It allows you to work with both aggregate and non-aggregate values all at once.
Spread provides a number of aggregate functions. For more details, refer to the Formula Functions sections.
Note: The aggregate functions don’t require ORDERBY, but they accept the window frame definition.
Spread provides the following ranking functions, listed alphabetically.
Function | Description |
---|---|
This function returns the cumulative distribution value. | |
This function returns the rank of the current row within its partition, without gaps. | |
This function returns the number of the current row within the partition. | |
This function returns the percentage of the rank value. | |
This function returns the rank of the current row within its partition with gaps. |
Spread provides the following analytic functions, listed alphabetically.
Function | Description |
---|---|
This function returns the value of the argument from the first row of the window frame. | |
This function provides access to the value from a row at a given physical offset that leads the current row. | |
This function returns the value of the argument from the last row of the window frame. | |
This function provides access to the value from a row at a given physical offset that follows the current row. | |
This function returns the value of the argument from the Nth row of the window frame. | |
This function returns the bucket number of the current row within its partition. |
The costs of window functions will gradually increase due to computational complexity and data volume.