Consider the following database:MOVIE(id,title,yr)ACTOR(id,name)CASTING(movieid,actorid)Identify the SQL command which will return the titles of all 1959 Marilyn Monroe films.Option 1. The following SQL...SELECT title FROM movie,casting,actor WHERE movieid = movie.id<> AND name = 'Marilyn Monroe' ; Option 2. The following SQL...SELECT title FROM movie,actor WHERE name = 'Marilyn Monroe' AND yr = 1959 ; Option 3. The following SQL...SELECT title FROM movie,casting,actor WHERE movieid = movie.id AND actor.id = actorid AND name = 'Marilyn Monroe' AND yr = 1959 ; Option 4. The following SQL...SELECT title FROM movie,casting,actor WHERE movieid = movie.id AND actor.id = actorid AND movie.yr = casting.yr AND name = 'Marilyn Monroe' AND yr = 1959 ; Question 5Select one:a.Option 1b.Option 2c.Option 3d.Option 4
Question
Consider the following database:MOVIE(id,title,yr)ACTOR(id,name)CASTING(movieid,actorid)Identify the SQL command which will return the titles of all 1959 Marilyn Monroe films.Option 1. The following SQL...SELECT title FROM movie,casting,actor WHERE movieid = movie.id<> AND name = 'Marilyn Monroe' ; Option 2. The following SQL...SELECT title FROM movie,actor WHERE name = 'Marilyn Monroe' AND yr = 1959 ; Option 3. The following SQL...SELECT title FROM movie,casting,actor WHERE movieid = movie.id AND actor.id = actorid AND name = 'Marilyn Monroe' AND yr = 1959 ; Option 4. The following SQL...SELECT title FROM movie,casting,actor WHERE movieid = movie.id AND actor.id = actorid AND movie.yr = casting.yr AND name = 'Marilyn Monroe' AND yr = 1959 ; Question 5Select one:a.Option 1b.Option 2c.Option 3d.Option 4
Solution
The correct option to return the titles of all 1959 Marilyn Monroe films is Option 3. The SQL command for this option is:
SELECT title FROM movie, casting, actor WHERE movieid = movie.id AND actor.id = actorid AND name = 'Marilyn Monroe' AND yr = 1959
Therefore, the answer is Option 3.
Similar Questions
AssignmentComplete & ContinueEnable fullscreen1.Write a SQL query to find the actors who were cast in the movie 'Annie Hall'. Return actor first name, last name and role.2.From the following tables, write a SQL query to find the director who directed a movie that casted a role for 'Eyes Wide Shut'. Return director first name, last name and movie title.3.Write a SQL query to find who directed a movie that casted a role as ‘Sean Maguire’. Return director first name, last name and movie title.4.Write a SQL query to find the actors who have not acted in any movie between 1990 and 2000 (Begin and end values are included.). Return actor first name, last name, movie title and release year.
Complete the SQL script to return the IDs of all the actors in the film with the titleCinderella.SELECT ...................................................................................................................FROM FILM_ACTORINNER JOIN .............................................................................................................ON FILM_FACT.FilmID = .........................................................................................WHERE FILM_FACT.FilmTitle =
Write SQL query considering below schema of databaseFilm(film_id, title, legth, rental_rate), Actor(film_id, actor_id, first_name, last_name)Category(film_id, rating, language, release_year)Create tables with Primary Key, foreign key constraints in given schemas.i.Give the name of actors whose actor id is 23.ii.Give the title of films whose id is between 25 and 40.iii.Give the name of actor whose last name contains Kapoor.iv.Give the title of film which was released in 2022.v.Give the name of actors played who have role in film title ‘Chhello divas’
Question 4What will this query return?SELECT *FROM Books_tableLEFT JOIN Biography_table1 pointAll records in Books_table and any matching rows from Biography_tableAll records in both Books_table and Biography_tableAll records in Biography_table and any matching rows from Books_tableAll rows from Books_table joined together with Biography_table
Given a database for a movie production company. The database includes information about actors, directors, movies, movie cast, and ratings. Write a query to retrieve the titles of all movies directed by 'Martin Scorsese' from the Movie Database.Your task is to identify and display the movies associated with the director with the name 'Martin Scorsese.'The following table is already created, and the records are inserted into the table.Table Details:
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.