Skip to main content
Since 1.16.0 This is an alternate first step for approximating the number of distinct values. It provides some added convenience by using some sensible default parameters to create a hyperloglog. Use approx_count_distinct to create an intermediate aggregate from your raw data. This intermediate form can then be used by one or more accessors in this group to compute final results. Optionally, multiple such intermediate aggregate objects can be combined using rollup() before an accessor is applied.

Samples

Given a table called samples, with a column called weights, return a hyperloglog over the weights column:
Using the same data, build a view from the aggregate that you can pass to other hyperloglog functions.

Arguments

The syntax is:

Returns