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

> حسابات bitmap أو دوال تجميع من عمود أعداد صحيحة غير موقّعة، تُرجع الكاردينالية من النوع UInt64، وإذا أُضيفت اللاحقة -State، فسيُعاد كائن bitmap

# groupBitmap

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

أُضيف في: v20.1.0

ينشئ bitmap (مصفوفة بتات) من عمود يحتوي على أعداد صحيحة غير موقعة، ثم يعيد عدد القيم الفريدة فيه (الكاردينالية).
وعند إلحاق لاحقة المُركِّب `-State`، فبدلًا من إعادة العدد، يعيد [كائن bitmap](/ar/reference/functions/regular-functions/bitmap-functions) الفعلي.

**الصيغة**

```sql theme={null}
groupBitmap(expr)
groupBitmapState(expr)
```

**المعاملات**

* `expr` — تعبير ينتج قيمة من النوع `UInt*`. [`UInt*`](/ar/reference/data-types/int-uint)

**القيمة المُعادة**

تُرجع عددًا من النوع `UInt64`، أو كائن bitmap عند استخدام `-State`. [`UInt64`](/ar/reference/data-types/int-uint)

**أمثلة**

**مثال على الاستخدام**

```sql title=Query theme={null}
CREATE TABLE t (UserID UInt32) ENGINE = Memory;
INSERT INTO t VALUES (1), (1), (2), (3);

SELECT groupBitmap(UserID) AS num FROM t;
```

```response title=Response theme={null}
┌─num─┐
│   3 │
└─────┘
```
