函数聚合函数聚合函数groupArrayIntersectgroupArrayIntersect 返回给定数组的交集(返回出现在所有给定数组中的所有元素)。 语法 groupArrayIntersect(x) 参数 x — 参数(列名或表达式)。 返回值 包含所有数组共有元素的数组。 类型:Array。 示例 考虑表 numbers: ┌─a──────────────┐ │ [1,2,4] │ │ [1,5,2,8,-1,0] │ │ [1,5,7,5,8,2] │ └────────────────┘ 使用列名作为参数的查询: SELECT groupArrayIntersect(a) AS intersection FROM numbers; 结果: ┌─intersection──────┐ │ [1, 2] │ └───────────────────┘