The read-only analysis engine currently supports most MySQL aggregate functions, but there are still limitations and incompatibilities in some scenarios. This document introduces the supported list of aggregate functions in the read-only analysis engine and lists the type limitations in input parameters. If input parameters and functions are not mentioned in the document, they are not supported.
Supported Aggregate Functions
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.