ClickHouse/docs/zh/sql-reference/aggregate-functions/reference/groupbitmap.md
2021-03-25 17:09:19 +08:00

557 B
Raw Blame History

toc_priority
128

groupBitmap

Bitmap or Aggregate calculations from a unsigned integer column, return cardinality of type UInt64, if add suffix -State, then return bitmap object.

groupBitmap(expr)

Parameters

expr An expression that results in UInt* type.

Return value

Value of the UInt64 type.

Example

Test data:

UserID
1
1
2
3

Query:

SELECT groupBitmap(UserID) as num FROM t

Result:

num
3