หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
Applies to:
Databricks SQL
Databricks Runtime
Returns the bitwise AND of all input values in the group.
Syntax
bit_and(expr) [FILTER ( WHERE cond ) ]
This function can also be invoked as a window function using the OVER clause.
Arguments
expr: An expression that evaluates to an integral numeric.cond: An optional boolean expression filtering the rows used for aggregation.
Returns
The result type matches the argument type.
Examples
> SELECT bit_and(col) FROM VALUES (3), (5) AS tab(col);
1
> SELECT bit_and(col) FILTER(WHERE col < 6) FROM VALUES (3), (5), (6) AS tab(col);
1