From 2a41a3cbbf8a20e7284cf5e2d319c278ab1a5ff8 Mon Sep 17 00:00:00 2001 From: chenzhuoyu Date: Sat, 10 Aug 2024 23:44:20 +0800 Subject: [PATCH] [fix] Remove count function --- .../primary-key-table/merge-engine/aggregation.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/content/primary-key-table/merge-engine/aggregation.md b/docs/content/primary-key-table/merge-engine/aggregation.md index 6ada48ad10a4e..5ac9de2ef6fbd 100644 --- a/docs/content/primary-key-table/merge-engine/aggregation.md +++ b/docs/content/primary-key-table/merge-engine/aggregation.md @@ -71,13 +71,13 @@ Current supported aggregate functions and data types are: It supports DECIMAL, TINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, and DOUBLE data types. ### count -In scenarios where counting rows that match a specific condition is required, you can use the SUM function to achieve this. By expressing a condition as a Boolean value (TRUE or FALSE) and converting it into a numerical value, you can effectively count the rows. In this approach, TRUE is converted to 1, and FALSE is converted to 0. + In scenarios where counting rows that match a specific condition is required, you can use the SUM function to achieve this. By expressing a condition as a Boolean value (TRUE or FALSE) and converting it into a numerical value, you can effectively count the rows. In this approach, TRUE is converted to 1, and FALSE is converted to 0. -For example, if you have a table orders and want to count the number of rows that meet a specific condition, you can use the following query: -```sql -SELECT SUM(CASE WHEN condition THEN 1 ELSE 0 END) AS count -FROM orders; -``` + For example, if you have a table orders and want to count the number of rows that meet a specific condition, you can use the following query: + ```sql + SELECT SUM(CASE WHEN condition THEN 1 ELSE 0 END) AS count + FROM orders; + ``` ### max