Aggregates
Aggregate
approx_count_distinct()
Computes the approximate count of distinct elements using HyperLogLog.
Arguments & returns
approx_count_distinct(any)
Aggregate
| Overload link | any |
Returns |
|---|---|---|
| #01 | ANY |
BIGINT |
Example
Haybarn WASM 1.5.5-rc3 · In your browser
Engine example with sample data · Run to view results.
In other engines
Prestoapprox_distinct()
SELECT APPROX_DISTINCT(a) FROM foo
SELECT APPROX_COUNT_DISTINCT(a) FROM foo