Skip to main content
On this page

Kater SQL Functions Aggregations

KATER__SUM

The total of the field's values.

Family: Aggregations

Syntax

KATER__SUM(field)

Arguments

ArgumentDescription
fieldThe 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 orders
GROUP BY
orders.channel
ORDER BY
1
ChannelUnits
email2,383
paid2,292
store2,330
web2,149

Compiles to

The call compiles to the same SQL on DuckDB and on Snowflake.

SUM(orders.quantity)

See also