📅  最后修改于: 2022-03-11 14:55:54.197000             🧑  作者: Mango
SELECT team_id, (array_agg(team_name))[1] AS teamname,
array_agg(player_id||'##'||player_name) AS playerdetails
FROM team
INNER JOIN players ON team_id = player_team
GROUP BY team_id