yiguolei commented on code in PR #2699:
URL: https://github.com/apache/doris-website/pull/2699#discussion_r2252886455


##########
docs/sql-manual/sql-functions/aggregate-functions/min.md:
##########
@@ -28,13 +28,77 @@ Returns the same data type as the input expression.
 ## Example
 
 ```sql
-select MIN(scan_rows) from log_statis group by datetime;
+-- setup
+create table t1(
+        k1 int,
+        k_string varchar(100),
+        k_decimal decimal(10, 2)
+) distributed by hash (k1) buckets 1
+properties ("replication_num"="1");
+insert into t1 values 
+    (1, 'apple', 10.01),
+    (1, 'banana', 20.02),
+    (2, 'orange', 30.03),
+    (2, null, null),
+    (3, null, null);
 ```
 
+```sql
+select k1, min(k_string) from t1 group by k1;
+```
+
+String type: For each group, returns the minimum string value.
+
+```text
++------+---------------+
+| k1   | min(k_string) |
++------+---------------+
+|    1 | apple         |
+|    2 | orange        |
+|    3 | NULL          |
++------+---------------+
+```
+
+```sql
+select k1, min(k_decimal) from t1 group by k1;
+```
+
+Decimal type: Returns the minimum high-precision decimal value.
+
+```text
++------+----------------+
+| k1   | min(k_decimal) |
++------+----------------+
+|    1 |          10.01 |
+|    2 |          30.03 |
+|    3 |           NULL |
++------+----------------+
+```
+
+```sql
+select min(k_string) from t1 where k1 = 3;
+```
+
+When all values in the group are NULL, returns NULL.

Review Comment:
   这个得在function 描述里,或者return value 那里做说明。参考snowflake 
https://docs.snowflake.com/en/sql-reference/functions/min



-- 
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