approx_count_distinct

approx_count_distinct

approx_count_distinct介绍

approx_count_distinct(expr[, relativeSD]) - 通过 HyperLogLog++ 返回估计的基数。relativeSD 定义了允许的最大相对标准偏差。

Examples:

> SELECT approx_count_distinct(col1) FROM VALUES (1), (1), (2), (2), (3) tab(col1);
 3

Since: 1.6.0