跳转到内容

使用 DataSketches Theta 算法返回近似去重计数。支持交集和差集等集合运算。

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