I have two tables, title
and territory
. Territory tells me where the title is available:
`title`
- id
- name
`territory`
- title_id (FK)
- territory
I want the output to look like this:
id name territory territory territory etc...
1 Titanic US GB FR
I am currently doing an INNER JOIN
, which gives me three rows for the above instead of one:
SELECT * FROM title inner join territory on title.id = territory.title_id
How would I get it in the above output, where athere is a single row per title, and all territories are listed in that row?