BIT_OR() GROUP BY ...

All functions > GROUP BY > BIT_OR() GROUP BY ...

Returns the bitwise OR of all integer values in the group.

Syntax

BIT_OR(expr)
 [ FILTER (WHERE condition) ]
  [ GROUP BY feature [, feature ...] ]

Notes

  • NULL values are ignored where the underlying aggregate skips NULLs
  • Can be used with FILTER (WHERE condition) and GROUP BY like other aggregates
  • Argument type must be an integer type

Examples

FeatureQL
SELECT
    -- Bitwise OR over one group
    f1 := ZIP(ARRAY(1, 1) AS g, ARRAY(3, 5) AS x).TRANSFORM(
        SELECT BIT_OR(x) GROUP BY g
    ).UNWRAP_ONE()
;
Result
f1 BIGINT
7

Last update at: 2026/06/20 10:08:10