APPROX_COUNT_DISTINCT(Lakehouse v2)
HyperLogLogを使用して、異なる値のおおよその件数を返します。
Analyzeの構文
Section titled “Analyzeの構文”func.approx_count_distinct(get_column(table, 'user_id'))Analyzeの例
Section titled “Analyzeの例”func.approx_count_distinct(get_column(table, 'user_id'))
┌─────┐│ 985 │└─────┘SQLの構文
Section titled “SQLの構文”APPROX_COUNT_DISTINCT(<user_id>)SELECT APPROX_COUNT_DISTINCT(user_id) FROM page_views;
┌─────┐│ 985 │└─────┘