HLL
Uses HyperLogLog to return an approximation of the distinct cardinality of the input.
Syntax
HLL(expression boolean) → varbinary
- expression: Expression for which you want to know the number of distinct values.
Examples
HLL exampleSELECT HLL(TRUE)
-- sample return
HLL(expression float) → varbinary
- expression: Expression for which you want to know the number of distinct values.
Examples
HLL exampleSELECT HLL(67.90)
-- sample return
HLL(expression varbinary) → varbinary
- expression: Expression for which you want to know the number of distinct values.
HLL(expression date) → varbinary
- expression: Expression for which you want to know the number of distinct values.
Examples
HLL exampleSELECT HLL('2021-06-15')
-- sample return
HLL(expression interval_year) → varbinary
- expression: Expression for which you want to know the number of distinct values.
HLL(expression interval_day) → varbinary
- expression: Expression for which you want to know the number of distinct values.
HLL(expression int64) → varbinary
- expression: Expression for which you want to know the number of distinct values.
Examples
HLL exampleSELECT HLL(2021)
-- sample return
HLL(expression double) → varbinary
- expression: Expression for which you want to know the number of distinct values.
Examples
HLL exampleSELECT HLL(45.7)
-- sample return
HLL(expression time) → varbinary
- expression: Expression for which you want to know the number of distinct values.
HLL(expression int32) → varbinary
- expression: Expression for which you want to know the number of distinct values.
Examples
HLL exampleSELECT HLL(2021)
-- sample return 1
HLL(expression varchar) → varbinary
- expression: Expression for which you want to know the number of distinct values.
Examples
HLL exampleSELECT HLL('dremio')
-- sample return 1
HLL(expression timestamp) → varbinary
- expression: Expression for which you want to know the number of distinct values.
Examples
HLL exampleSELECT HLL('2021-06-17 11:50:59')
-- sample return 1
Was this page helpful?
Glad to hear it! Thank you for your feedback.
Sorry to hear that. Thank you for your feedback.