BITAND_AGG

functionsupportedCore SQL functions

docs.snowflake.com ↗

Aggregate functionsWindow functionsBitwise expression functions

Returns the bitwise AND value of all non-NULL numeric records in a group. For each bit position, if all rows have the bit set to 1, then the bit is set to 1 in the result. If any rows have that bit set to zero, the result is zero. If all records inside the group are NULL, or if the group is empty, the function returns NULL.

Syntax

supportedpartialnot supportednot scored

Aggregate function

BITAND_AGG( <expr1> )

Window function

BITAND_AGG( <expr1> ) OVER ( [ PARTITION BY <expr2> ] )

Parameters

NameRequiredDescription
expr1requiredThis expression must evaluate to a numeric value or a value of a data type that can be cast to a numeric value.
expr2requiredThis expression is used to group the rows in partitions.

Returns

The data type of the returned value is NUMBER(38, 0).

Usage notes

See also

Referenced by