需求:按照项目名,以逗号合并参与人
![](https://img-blog.csdnimg.cn/affa6c4451724d378ad9155d66a27265.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80NjEwMTgzOQ==,size_16,color_FFFFFF,t_70)
presto
select
item_name
,array_join(array_agg(name),',') as group_name
from
test.test_04
group by
item_name
order by item_name
hive
select
item_name
,concat_ws(',',collect_set(name)) as group_name
from
test.test_04
group by
item_name
order by item_name
mysql
select
item_name,
group_concat(name,',') as group_name
from
test_prc
group by item_name