| Parameter | Type | Description |
|---|---|---|
value | any | the values to be counted |
Returns: any
Example
query:
SELECT APPROX_DISTINCT(close_value)
FROM sales_pipeline
result:
| approx_distinct |
|---|
| 2049.1341 |
APPROX_DISTINCT calculates an approximate count of the number of distinct values. It provides an approximation to COUNT(distinct) but is much faster. APPROX_DISTINCT should produce a standard error of 2.3%, the standard deviation of the error distribution over all input sets. APPROX_DISTINCT does not guarantee a bound on the error for any specific input set.
| Parameter | Type | Description |
|---|---|---|
value | any | the values to be counted |
query:
SELECT APPROX_DISTINCT(close_value)
FROM sales_pipeline
result:
| approx_distinct |
|---|
| 2049.1341 |