Aggregates Aggregate

bit_or()

Returns the bitwise OR of all bits in a given expression.

Arguments & returns

11 overloads

bit_or(arg)

Aggregate
Overload link arg Returns
#01 BIGINT BIGINT
#02 BIT BIT
#03 HUGEINT HUGEINT
#04 INTEGER INTEGER
#05 SMALLINT SMALLINT
#06 TINYINT TINYINT
#07 UBIGINT UBIGINT
#08 UHUGEINT UHUGEINT
#09 UINTEGER UINTEGER
#10 USMALLINT USMALLINT
#11 UTINYINT UTINYINT

Example

bit_or example
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example with sample data · Run to view results.

In other engines

BigQuerybit_or()

Same function

Snowflakebitor_agg()

SELECT BITOR_AGG(int_value) FROM t
In Haybarn
SELECT BIT_OR(int_value) FROM t

SQLGlot example ↗