Ir al contenido

Devuelve un recuento aproximado de valores distintos mediante el algoritmo Theta de DataSketches. Admite operaciones de conjuntos como la intersección y la diferencia.

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 │
└───────┘