Aller au contenu

Renvoie un nombre distinct approximatif à l’aide de l’algorithme Theta de DataSketches. Prend en charge les opérations ensemblistes comme l’intersection et la différence.

func.ds_theta_count_distinct(get_column(table, 'user_id'))
func.ds_theta_count_distinct(get_column(table, 'user_id'))
┌───────┐
│ 10035 │
└───────┘
DS_THETA_COUNT_DISTINCT(<expr>)
SELECT DS_THETA_COUNT_DISTINCT(user_id) FROM page_views;
┌───────┐
│ 10035 │
└───────┘