Skip to main content Skip to complementary content

COUNT_IF

Counts the number of TRUE input values.

This function is equivalent to COUNT(CASE WHEN X THEN 1 END).

Syntax

COUNT_IF(X)

Arguments

X

Type: any

Values that be evaluated as a Boolean.

Returns

Type: bigint

Returns the number of TRUE input values.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!