Categories: Bitwise, Aggregate
BIT_OR
Returns the bitwise OR
of non-NULL input values.
Syntax
BIT_OR(expression int) → int
- expression: An expression that evaluates to a data type that can be cast as an integer.
Examples
BIT_OR exampleSELECT BIT_OR(passenger_count)
FROM Samples."samples.dremio.com"."NYC-taxi-trips"
-- EXPR$0
-- 255
SELECT total_amount,
BIT_OR(passenger_count)
FROM Samples."samples.dremio.com"."NYC-taxi-trips"
GROUP BY total_amount
-- total_amount, EXPR$1
-- 29.0, 7
-- 5.5, 15
Usage Notes
If no rows match, returns a value with all bits set to 0. NULL values have no effect on the result unless all results are NULL, which is treated as no match.
Was this page helpful?
Glad to hear it! Thank you for your feedback.
Sorry to hear that. Thank you for your feedback.