groupBitmap

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

  1. groupBitmap(expr)

Parameters

expr – An expression that results in UInt* type.

Return value

Value of the UInt64 type.

Example

Test data:

  1. UserID
  2. 1
  3. 1
  4. 2
  5. 3

Query:

  1. SELECT groupBitmap(UserID) as num FROM t

Result:

  1. num
  2. 3