On this page
Kater SQL Functions Windows
Windows
A window works out a value for each row of the result from other rows of the result, such as a running total or a rank.
The Windows menu writes them. Write the OVER clause after the call. In a query, declare it with CUSTOM_CALCULATION. See Running totals, ranks and windows.
| Function | What it does |
|---|---|
KATER__WINDOW_AGGREGATION | A running or trailing aggregate of the value, row by row in the OVER’s order. |
KATER__LAG | The value from an earlier row, offset rows back in the OVER’s order. |
KATER__LEAD | The value from a later row, offset rows on in the OVER’s order. |
KATER__FIRST_VALUE | The value on the first row of its partition, in the OVER’s order. |
KATER__LAST_VALUE | The value on the last row of its partition, in the OVER’s order. |
KATER__DELTA | The value minus the value on the row before. |
KATER__PERCENT_DELTA | The change from the row before, as a share of that row’s value. |
KATER__RANK | The value’s rank among the rows, with 1 for the largest or the smallest value. |
KATER__ROW_NUMBER | The row’s place when the rows are sorted by the value, from 1. |
KATER__SHARE_OF_TOTAL | The value as a share of the total of all the rows in its partition. |