HLL_ESTIMATE

functionsupportedCore SQL functions

docs.snowflake.com ↗

Aggregate functionsWindow functions

Returns the cardinality estimate for the given HyperLogLog state. A HyperLogLog state produced by HLL_ACCUMULATE and HLL_COMBINE can be used to compute a cardinality estimate using the HLL_ESTIMATE function. Thus, HLL_ESTIMATE(HLL_ACCUMULATE(…)) is equivalent to HLL(…).

Syntax

supportedpartialnot supportednot scored

Aggregate function

HLL_ESTIMATE( <state> )

Window function

HLL_ESTIMATE( <state> ) OVER ( [ PARTITION BY <expr> ] )

Parameters

NameRequiredDescription
staterequiredAn expression that contains state information generated by a call to HLL_ACCUMULATE or HLL_COMBINE.

Usage notes

See also

Referenced by