BITXOR_AGG

functionsupportedCore SQL functions

docs.snowflake.com ↗

Aggregate functionsWindow functionsBitwise expression functions

Returns the bitwise XOR value of all non-NULL numeric records in a group. In each bit position, if an even number of rows have that bit set to 1, then the function returns 0 for that bit, and if an odd number of rows have that bit set to 1, then the function returns 1 for that bit. If all records inside the group are NULL, or if the group is empty, the function returns NULL.

Syntax

supportedpartialnot supportednot scored

Aggregate function

BITXOR_AGG( [ DISTINCT ] <expr1> )

Window function

BITXOR_AGG( [ DISTINCT ] <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