Write a SQL query that retrieves actors and what movies they were in from the fo
ID: 675374 • Letter: W
Question
Write a SQL query that retrieves actors and what movies they were in from the following file directory:
MOVIE: Table of movies that are available
id: integer defining the movie instance
title: string with the title of the movie
ACTOR: Table of actors
id: integer indentifying the actor instance
name: string with the full name of the actor
MOVIE_ACTOR: association between a movie and its genre
movie_id: integer identifying the movie instance
actor_id: integer identifying the actor instance
Explanation / Answer
select b.name, a.title from movie a, actor b, movie_actor c where c.movie_id = a.id and c.actor_id = b.id;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.