需求:按照项目名,以逗号合并参与人
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