dcount
Table of Contents
Aggregate Function
dcount — count distinct input values
Synopsis
dcount(<any>) -> uint64
Description
The dcount aggregation function uses hyperloglog to estimate distinct values of the input in a memory efficient manner.
Examples
Count of values in a simple sequence:
dcount(this)
1
2
2
3
Loading...
Continuous count of simple sequence:
yield dcount(this)
1
2
2
3
Loading...
Mixed types are handled:
yield dcount(this)
1
"foo"
10.0.0.1
Loading...
The estimated result may become less accurate with more unique input values:
dcount(this)
true
Loading...
Count of values in buckets grouped by key:
dcount(a) by k |> sort
{a:1,k:1}
{a:2,k:1}
{a:3,k:2}
Loading...