
It's a pretty simple set up, but the query is annoying me.
But I can't figure out how to display the Genre's that are related to each film.
Code:
SELECT f.FilmID, f.Title, r.Rating, g.Genre
FROM Film f
INNER JOIN Film_rating r ON f.RatingID = r.RatingID
INNER JOIN Film_Genre fg ON fg.FilmID = f.FilmID
INNER JOIN Genre g ON fg.GenreID = g.GenreID
Code:
FilmID Title Rating Genre
1 Toy Story U Animated
1 Toy Story U Childrens/Kids/Family
It works... But I don't want two rows. So I'm obviously doing it wrong. But I have no ideas how to fix it.
Any ideas?
