Method (without deduplication): groupArray
Method (duplication removal): groupUniqArray
usage:
SELECT 分组列,groupArray(合并列——字符串类型)
from 表1
group by 分组列;
result:
raw data:
Aggregated data results:
If you want to flatten the array into a string, use arrayStringConcat(string, delimiter)
usage:
SELECT arrayStringConcat(['4','5','6'],',');
result: