My tables:
people
name person_id
Joe 1
Jack 2
tags
tag_id tag_name
1 blue
2 green
3 black
4 red
assignments
person_id tag_id
1 1
1 2
1 3
1 4
2 2
2 4
What I want is the following result:
result
name tags
Joe blue,green.black,red
Jack green,red
What is unique here is that the third table requires me to join the names of the tags first and I wan't those concatenated, not the raw ids...