Answers for "postgres array_agg first element PIVOT"

0

postgres array_agg first element PIVOT

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
Posted by: Guest on July-02-2021

Browse Popular Code Answers by Language