${table.column} syntax to reference fields in your results table.
Row functions use your query’s current sort order to determine row positions. Changing the sort order of your results will change the output of these functions.
row
Returns the 1-based row number of the current row.Compiled SQL
Compiled SQL
ORDER BY clause uses the sort order configured in your query.offset
Returns the value of a column from a row at a relative offset from the current row.
Example
Get the previous row’s revenue to calculate period-over-period changes:
Compiled SQL
Compiled SQL
For negative offsets (previous rows):For positive offsets (next rows):For an offset of 0, the column value is returned directly with no window function.
index
Returns the value of an expression from an absolute row position (1-based).
Example
Compare every row’s revenue against the first row’s revenue:
Compiled SQL
Compiled SQL
lookup
Finds a value in one column and returns the corresponding value from another column.
If multiple rows match, the largest matching value from
resultColumn is returned.
Example
Look up the revenue for a specific status:
Compiled SQL
Compiled SQL
offset_list
Returns an array of values from consecutive rows starting at a relative offset.
Example
Get the current and two previous revenue values (a 3-period window):
Compiled SQL
Compiled SQL
list
Constructs an array from multiple values. Unlike the other row functions,list does not use any windowing.
Example
Create an array of specific column values:
Compiled SQL
Compiled SQL