BiteTheDDDDt commented on code in PR #2687:
URL: https://github.com/apache/doris-website/pull/2687#discussion_r2247148502


##########
i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/approx-count-distinct.md:
##########
@@ -30,13 +30,63 @@ APPROX_COUNT_DISTINCT(<expr>)
 ## 举例
 
 ```sql
-select approx_count_distinct(query_id) from log_statis group by datetime;
+-- setup
+create table t1(
+        k1 int,
+        k2 varchar(100)
+) distributed by hash (k1) buckets 1
+properties ("replication_num"="1");
+insert into t1 values 
+    (1, 'apple'),
+    (1, 'banana'),
+    (1, 'apple'),
+    (2, 'orange'),
+    (2, 'orange'),
+    (2, 'grape'),
+    (3, 'cherry'),
+    (3, null);
 ```
 
+```sql
+select approx_count_distinct(k2) from t1;
+```
+
+计算所有 k2 值的近似去重数量,NULL 值不参与计算。

Review Comment:
   一致的



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to