I have some tables that I’m joining in a query with Postgres (9).
However, as it’s a many to many relationship, I’m getting lots of records where I have a record for table A, and then the items for table B (as expected). For instance:
Car, Ford
Car, BMW
Car, VW
Bike, Yamaha
Bike, BMW
Bike, Honda
What I’m after is getting the relationship as a list:
Car, "Ford, BMW, VW"
Bike, "Yamaha, BMW, Honda"
Is this possible with Postgres in a normal query, or do I need to do something more magic?
You will need to replace the column and table names with the real ones (which you have not provided so I can’t use the correct ones here).