Aggregates
Aggregate
approx_count_distinct()
Computes the approximate count of distinct elements using HyperLogLog.
Reference: DuckDB 2.0.0
Arguments & returns
approx_count_distinct(any)
Aggregate
| Overload link | any |
Returns |
|---|---|---|
| #01 | ANY |
BIGINT |
Example
Haybarn WASM 2.0.0-rc12 · 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