I have a problem with a SELECT with multiple inner joins. My code is as follows:
SELECT `movies02`.`id`, `movies02`.`title`,
`movies03`.`talent`,
`movies07`.`character`,
`movies05`.`genre`
FROM `movies02`
INNER JOIN `movies07` ON `movies07`.`movie` = `movies02`.`id`
INNER JOIN `movies03` ON `movies03`.`id` = `movies07`.`performer`
INNER JOIN `movies08` ON `movies08`.`genre` = `movies05`.`id`
INNER JOIN `movies02` ON `movies08`.`movie` = `movies02`.`id`;
Doing an INNER JOIN to get the actors in the movie, as well as the characters they play, seems to work but the second two, which get the movie genre, don't work so I figure I can just write them as a VIEW and then combine them when I output the results. I would, therefore, end up with three VIEWs. One to get the genres, actors and characters, and then one to put everything together. Question is whether it is better to do that than one massive SELECT with multiple joins?
I tried rewriting the query a bunch of times and in multiple ways