Aggregate function combinators
A combinator is a suffix on the name of an aggregate function, as in sumIf. Combinators can be stacked, as in sumIfOrNull.
| Suffix | Description |
|---|---|
State | Returns the intermediate state of the aggregate as a value instead of the final result. |
Merge | Combines intermediate states made by the State combinator and returns the final result. |
If | Takes a condition as the last argument and applies the aggregate only to the rows where it holds. |
OrNull | Returns NULL instead of the default value when the aggregate saw no rows. |
Array | Takes arrays and applies the aggregate to every element as if each element were a row. |
ForEach | Takes arrays and applies the aggregate to each position, returning an array. |