tencent cloud

TDSQL Boundless

Description of Supported Aggregate Functions

Download
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-07-10 11:13:51
The read-only analysis instance supports most MySQL aggregate functions, but it still has limitations and incompatibilities in some scenarios. This document describes the list of aggregate functions supported by the read-only analysis instance and specifies the supported data types for each function's parameters. Parameter types and functions not listed in this document are not supported.

Supported Aggregate Functions

COUNT Function

Count the number of rows.
Syntax: COUNT(val)
The data types supported by val are: int, bigint, double, decimal, varchar, char.

SUM Function

Sum the values.
Syntax: SUM(val)
The data types supported by val are: int, bigint, double, decimal, varchar, char.

AVG Function

Calculate the average value.
Syntax: AVG(val)
The data types supported by val are: int, bigint, double, decimal, varchar, char.

MAX Function

Returns the maximum value in a column.
Syntax: MAX(val)
The data types supported by val are: int, bigint, double, decimal, varchar, char, time, date, datetime, timestamp.

GREATEST Function

Returns the maximum value among multiple values.
Syntax: GREATEST(val1, val2, ...)
The data types supported by parameters such as val1 and val2 are: int, bigint, double, decimal, varchar, char, time, date, datetime, timestamp.

MIN Function

Returns the minimum value in a column.
Syntax: MIN(val)
The data types supported by val are: int, bigint, double, decimal, varchar, char.

GROUP_CONCAT Function

Combine the values of multiple identical fields in a group into one string.
Syntax: GROUP_CONCAT(val)
The data types supported by val are: int, bigint, double, decimal, varchar, char.

ANY_VALUE Function

Return any value in a group.
Syntax: ANY_VALUE(val)
The data types supported by val are: int, bigint, double, decimal, varchar, char.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백