ClickHouse/docs/en/sql-reference/aggregate-functions/reference/groupbitmap.md
Ivan Blinkov 7170f3c534
[docs] split aggregate function and system table references (#11742)
* prefer relative links from root

* wip

* split aggregate function reference

* split system tables
2020-06-18 11:24:31 +03:00

45 lines
557 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 or Aggregate calculations from a unsigned integer column, return cardinality of type UInt64, if add suffix -State, then return [bitmap object](../../../sql-reference/functions/bitmap-functions.md).
``` sql
groupBitmap(expr)
```
**Parameters**
`expr` An expression that results in `UInt*` type.
**Return value**
Value of the `UInt64` type.
**Example**
Test data:
``` text
UserID
1
1
2
3
```
Query:
``` sql
SELECT groupBitmap(UserID) as num FROM t
```
Result:
``` text
num
3
```