So I have those two tables:
+----------+ +---------------+
|tGathering| |tGatheredPeople|
+----------+ +---------------+
|cId | |cGatheringID |
|cPlace | |cPeople |
|... | +---------------+
+----------+
I want in one select query to retrieve data about Gatherings in one Place (say “Berlin, Germany”), and amongst the values, would be a comma-separated string of all the people present at one gathering.
Is it possible to do it in one query? And if yes, how does one call this kind of query (as you may have noticed, I had difficulties defining what I was searching for)?
Check out the GROUP_CONCAT function
An example usage would be: