ClickHouse/docs/ru/sql-reference/aggregate-functions/reference/groupbitmap.md
BayoNet c1b71ab06e
DOCS-733: Fixed broken links in Russian version (#13106)
* CLICKHOUSEDOCS-733: Fixed some broken links. Updated introduction and TOC in aggregate functions.

* CLICKHOUSEDOCS-733: Fixed files endings.

* CLICKHOUSEDOCS-733: Returned the list of functions back to reference index.

Co-authored-by: Sergei Shtykov <bayonet@yandex-team.ru>
Co-authored-by: emironyuk <em@don.ru>
2020-07-30 15:49:19 +03:00

47 lines
998 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
toc_priority: 128
---
# groupBitmap {#groupbitmap}
Bitmap или агрегатные вычисления для столбца с типом данных `UInt*`, возвращают кардинальность в виде значения типа UInt64, если добавить суффикс -State, то возвращают [объект bitmap](../../../sql-reference/functions/bitmap-functions.md).
``` sql
groupBitmap(expr)
```
**Параметры**
`expr` выражение, результат которого имеет тип данных `UInt*`.
**Возвращаемое значение**
Значение типа `UInt64`.
**Пример**
Тестовые данные:
``` text
UserID
1
1
2
3
```
Запрос:
``` sql
SELECT groupBitmap(UserID) as num FROM t
```
Результат:
``` text
num
3
```
[Оригинальная статья](https://clickhouse.tech/docs/en/sql-reference/aggregate-functions/reference/groupbitmap/) <!--hide-->