tencent cloud

TDSQL-C for MySQL

Description of Supported Aggregation Functions

Download
Focus Mode
Font Size
Last updated: 2025-10-21 18:13:11
Currently, the read-only analysis engine supports most of MySQL's aggregation functions, but there are still limitations and incompatibilities in certain scenarios. This document introduces the list of supported aggregation functions in the read-only analysis engine, and enumerates type restrictions on input parameters. Input parameters and functions not mentioned in the document are not supported.

Supported Aggregation Function Types

count Function

Count the number of rows.
Syntax: count(val) Supported value types for val: int, bigint, double, decimal, varchar, and char.

sum Function

Sum the values.
Syntax: sum(val) Supported value types for val: int, bigint, double, decimal, varchar, and char.

avg Function

Calculate the average.
Syntax: avg(val) Supported value types for val: int, bigint, double, decimal, varchar, and char.

max Function

Obtain the maximum value.
Syntax: max(val)
Supported value types for val: int, bigint, double, decimal, varchar, char, time, date, datetime, and timestamp.

greatest Function

Obtain the maximum value from multiple columns.
Syntax: greatest(val1,val2,...)
Supported value types for val: int, bigint, double, decimal, varchar, char, time, date, datetime, and timestamp.

min Function

Obtain the minimum value.
Syntax: min(val) Supported value types for val: int, bigint, double, decimal, varchar, and char.

group_concat Function

Combine the values of multiple identical fields in a group into one string.
Syntax: group_concat(val) Supported value types for val: int, bigint, double, decimal, varchar, and char.

any_value(arg) Function

Return any value in a group.
Syntax: any_value(val) Supported value types for val: int, bigint, double, decimal, varchar, and char.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback