Skip to main content
On this page

Kater SQL Functions Aggregations

KATER__COUNT_FALSE

How many rows have FALSE in the field.

Family: Aggregations

Syntax

KATER__COUNT_FALSE(field)

Arguments

ArgumentDescription
fieldThe field to aggregate.

Returns

A whole number. The field menu writes @format number(0) beside it.

Usage notes

  • TRUE and empty values are not counted.

Example

This Sandbox query reads the sample shop’s orders. The table shows the rows that Kater gave.

SELECT
orders.channel AS "Channel",
KATER__COUNT_FALSE(orders.is_gift) AS "Other Orders"
FROM kater_dataset.orders AS orders
GROUP BY
orders.channel
ORDER BY
1
ChannelOther Orders
email714
paid700
store682
web648

Compiles to

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

COUNT(CASE WHEN (orders.is_gift) = FALSE THEN 1 END)

See also