> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8a08bda2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> 对一组数值进行按位 `与` 运算。

# groupBitAnd

<div id="groupBitAnd">
  ## groupBitAnd
</div>

引入版本：v1.1.0

对一组数值执行按位与运算。

**语法**

```sql theme={null}
groupBitAnd(expr)
```

**别名**: `BIT_AND`

**参数**

* `expr` — `(U)Int*` 类型的表达式。[`(U)Int*`](/zh/reference/data-types/int-uint)

**返回值**

返回一个 `(U)Int*` 类型的值。[`(U)Int*`](/zh/reference/data-types/int-uint)

**示例**

**按位与示例**

```sql title=Query theme={null}
CREATE TABLE t (num UInt32) ENGINE = Memory;
INSERT INTO t VALUES (44), (28), (13), (85);

-- 测试数据：
-- 二进制     十进制
-- 00101100 = 44
-- 00011100 = 28
-- 00001101 = 13
-- 01010101 = 85

SELECT groupBitAnd(num) FROM t;
```

```response title=Response theme={null}
-- 结果：
-- 二进制     十进制
-- 00000100 = 4

┌─groupBitAnd(num)─┐
│                4 │
└──────────────────┘
```
