Answered step by step
Verified Expert Solution
Question
1 Approved Answer
SQL Write an SQL query to search the imdb database for all directors who have appeared in one of their own movies, playing two or
SQL Write an SQL query to search the imdb database for all directors who have appeared in one of their own movies, playing two or more characters in th same movie. Show only the names of the director, in alphabetical order by last name ascending, breaking ties by first name in ascending order. Each director should be listed only once. Recall the imdb database tables actors movies roles id first name last name gender 33259 Wiliam 797926 Briney 831289 Sigourney Weaver actor id movie id 33259 313398 Capt. James T. Kirk 33259 407323 Sgt. TJ. Hooker 97926342189 Herself role id 12290 209658 Meet the Parents2000 7 2105Memento name rank Fight Club1999 SpearsF 2000 8.7 directors id first name last name 4758 David 66965 Jay 72723William Fincher Roach Shatner movies directors director id movie id 24758 66965 72723 112290 209658 313398 movies genres movie id genre 209658 Comedy 313398 313398 Sc-Fi Action When run on the imdb database, your query would produce the following results first name last name I LeVar Santo Claus Theo Gartner Burton Cilauro Gleisner Kennedy Jane (I Tony (III)Martin Mick (I) Yves Rob Jason James Melendez Mollo Renie Sitch Stephens Tolkan 12 rows in set Note that actor IDs and director IDs are not equal, but you may assume that only one actor and director share the same first/last name. If you join too many tables together that are not needed You should solve this problem using only the SQL syntax taught in class. for the query, you will not receive full credit
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started