DS_HLL_COUNT_DISTINCT

Returns an approximate distinct count using DataSketches HLL algorithm. More accurate than APPROX_COUNT_DISTINCT.

Analyze Syntax

func.ds_hll_count_distinct(get_column(table, 'user_id'))

Analyze Examples

func.ds_hll_count_distinct(get_column(table, 'user_id'))

┌───────┐
 10042 
└───────┘

SQL Syntax

DS_HLL_COUNT_DISTINCT(<expr>)

SQL Examples

SELECT DS_HLL_COUNT_DISTINCT(user_id) FROM page_views;

┌───────┐
 10042 
└───────┘