I have sql left join where there is are multiple right side hits for every join. Instead if returning a row for each right side match i'd like to return a single row where the multiple right side matches are combined into a csv [ comma separated value result ].
-- instead of this that produces a left.id row for every associated tag entry . . .
select left.id, left.name, right.tag from support_request left
join support_request_tags right on left.id = right.support_request_id
-- need something like this that produces one left.id row with csv column of all associated tag entries . . .
select left.id, left.name, right.<csv list of all associated tags ???> from support_request left
join support_request_tags right on left.id = right.support_request_id
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…