我是Presto的新手,希望獲得與MySQL中的group_concat函數相同的功能。以下兩個等價物是?如果沒有,關於如何在Presto中重新創建group_concat功能的建議?Presto相當於MySQL group_concat
的MySQL:
select
a,
group_concat(b separator ',')
from table
group by a
普雷斯托:(搜索GROUP_CONCAT功能時,發現這是一個建議普雷斯托解決辦法here)
select
a,
array_join(array_agg(b), ',')
from table
group by a