Training
Module
Summarizing data: Aggregate functions and grouping - Training
Analyze data in PostgreSQL with aggregate functions and grouping. Learn COUNT, SUM, AVG, and filter results using GROUP BY and HAVING.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
bit_xor
aggregate functionApplies to: Databricks SQL
Databricks Runtime
Returns the bitwise XOR
of all input values in the group.
bit_xor ( [ALL | DISTINCT] expr ) [FILTER ( WHERE cond ) ]
This function can also be invoked as a window function using the OVER
clause.
expr
: An expression that evaluates to an integral numeric.cond
: An optional boolean expression filtering the rows used for aggregation.The result type matches the argument type.
If DISTINCT
is specified the aggregate operates only on distinct values.
> SELECT bit_xor(col) FROM VALUES (3), (3), (5) AS tab(col);
5
> SELECT bit_xor(DISTINCT col) FROM VALUES (3), (3), (5) AS tab(col);
6
Training
Module
Summarizing data: Aggregate functions and grouping - Training
Analyze data in PostgreSQL with aggregate functions and grouping. Learn COUNT, SUM, AVG, and filter results using GROUP BY and HAVING.