APPROXIMATE_COUNT_DISTINCT_SYNOPSIS
Summarizes the information of distinct non-NULL values and materializes the result set in a VARBINARY
or LONG VARBINARY
synopsis object. The calculated result is within a specified range of error tolerance. You save the synopsis object in a Vertica table for use by APPROXIMATE_COUNT_DISTINCT_OF_SYNOPSIS
.
Behavior Type
Syntax
APPROXIMATE_COUNT_DISTINCT_SYNOPSIS ( expression[, error‑tolerance] )
Parameters
expression | Value to evaluate using any data type that supports equality comparison. |
error‑tolerance |
Numeric value that represents the desired percentage of error tolerance, distributed around the value returned by this function. The smaller the error tolerance, the closer the approximation. You can set If you omit this argument, Vertica uses an error tolerance of 1.25(%). For more details, see |
Restrictions
APPROXIMATE_COUNT_DISTINCT_SYNOPSIS
and DISTINCT
aggregates cannot be in the same query block.
Example
See APPROXIMATE_COUNT_DISTINCT_OF_SYNOPSIS
.