tencent cloud

TDSQL Boundless

Description of Supported Aggregate Functions

Download
Mode fokus
Ukuran font
Terakhir diperbarui: 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.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan