On this page
Kater SQL Functions Aggregations
KATER__SUM
The total of the field's values.
Family: Aggregations
Syntax
KATER__SUM(field)Arguments
| Argument | Description |
|---|---|
field | The field to aggregate. |
Returns
A number. The field menu writes the @format of the field it reads beside it, or @format number(2) where that field has none and can have decimals.
Usage notes
- Empty values are left out.
Example
This Sandbox query reads the sample shop’s orders. The table shows the rows that Kater gave.
SELECT orders.channel AS "Channel", KATER__SUM(orders.quantity) AS "Units"FROM kater_dataset.orders AS ordersGROUP BY orders.channelORDER BY 1| Channel | Units |
|---|---|
| 2,383 | |
| paid | 2,292 |
| store | 2,330 |
| web | 2,149 |
Compiles to
The call compiles to the same SQL on DuckDB and on Snowflake.
SUM(orders.quantity)See also
- Measures
- Other functions in Aggregations:
KATER__AVG,KATER__MIN,KATER__MAX,KATER__COUNT,KATER__COUNT_DISTINCT,KATER__COUNT_TRUE,KATER__COUNT_FALSE,KATER__LIST