Martin Mollov Sitch Write an SQL query to search the imdb database for all directors who...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Martin Mollov Sitch 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 id name year rank actor_id movie_id role 433259| William Shatner M 112290 Fight Club 1999 8.5 433259 313398 Capt. James T. Kirk 797926 Britney Spears F 209658 Meet the Parents 2000 7 433259 407323 Sgt. T.J. Hooker 831289 Sigourney Weaver F 210511 Memento 2000 8.7 797926 342189 Herself directors movies directors movies genres id first name last name director id movie id movie id genre 24758 David Fincher 24758 112290 209658 Comedy 66965 Jay Roach 66965 209658 313398 Action 72723 William Shatner 72723 313398 313398 Sci-Fi **. When run on the imdb database, your query would produce the following results: first name last name LeVar Santo Claus Theo Tom Jane Tony (IÍI) Bili Mick (I) Burton Cilauro Gartner Gleisner Kennedy (I) Melendez Renier Yves Rob Jason James 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 for the query, you will not receive full credit. You should solve this problem using only the SQL syntax taught in class. Martin Mollov Sitch 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 id name year rank actor_id movie_id role 433259| William Shatner M 112290 Fight Club 1999 8.5 433259 313398 Capt. James T. Kirk 797926 Britney Spears F 209658 Meet the Parents 2000 7 433259 407323 Sgt. T.J. Hooker 831289 Sigourney Weaver F 210511 Memento 2000 8.7 797926 342189 Herself directors movies directors movies genres id first name last name director id movie id movie id genre 24758 David Fincher 24758 112290 209658 Comedy 66965 Jay Roach 66965 209658 313398 Action 72723 William Shatner 72723 313398 313398 Sci-Fi **. When run on the imdb database, your query would produce the following results: first name last name LeVar Santo Claus Theo Tom Jane Tony (IÍI) Bili Mick (I) Burton Cilauro Gartner Gleisner Kennedy (I) Melendez Renier Yves Rob Jason James 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 for the query, you will not receive full credit. You should solve this problem using only the SQL syntax taught in class.
Expert Answer:
Answer rating: 100% (QA)
select afirstname as firstname alastname as lastname from select actorid as actorid director... View the full answer
Related Book For
Modern Database Management
ISBN: 978-0133544619
12th edition
Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi
Posted Date:
Students also viewed these databases questions
-
Write an SQL query to answer the following question: 1. Which instructors are qualified to teach ISM 3113? 2. Write an SQL query to answer the following question: Is any instructor qualified to teach...
-
Write an SQL query to list each customer who bought at least one product that belongs to product line Basic in March 2015. List each customer only once.
-
Write an SQL query to list the salesperson who has sold the most computer desks.
-
Solve: y(4) +18y"+81y = 0 y(0) = -4, y'(0) = 8, y'(0) = 42, y"(0) = -108 - Submit Question X
-
The Yurdone Corporation wants to set up a private cemetery business. According to the CFO, Barry M. Deep, business is looking up. As a result, the cemetery project will provide a net cash in flow of...
-
Determine the kinetic energy lost when corner C of the plate of Prob. 18.35 hits the obstruction.
-
Francine Steele and Shaun Dunn formed a partnership on 1 July 2025. Some of Steeles business assets and liabilities were assumed by the partnership, and these are listed below at both carrying...
-
The worksheet of Bridgets Office Supplies contains the following revenue, cost, and expense accounts. Prepare a classified income statement for this firm for the year ended December 31, 2016. The...
-
A student addresses a bully mocking another student, " what you're doing isn't even clever or funny, everyone has a right ti express who they are.. you know like we say every morning.. liberty and...
-
Stylz Company, a recent start-up fashion retailer based in the United States, is deciding between opening its first sales presence in either Italy's Tuscany Region or Spain's Matarrana Region....
-
XY Limited is a company that provides financial support to its clients with a financial period ended 31 December 2020. On the 15 of January 2021, a significant client of XY Limited, Tant Pty Ltd, had...
-
4. Solve the following systems: (a) x + x2 + 2x3 = 8 - -x1 2x + 3x3 1 3x17x2 + 4x3 = 10 (b) x+y+z=3 4x + 4y + 4z = 7 3xy + 2z = 5
-
Shown below is the block diagram of the datapath that was used for Greatest Common Divisor (GCD) calculation in the lab task. 19 else selA SelB LoadA LoadB AeqB else AltB Loadgcd done Y = A-B; end if...
-
Consider the two regions in the state of Central Ulna, Dockside and Lakeside. In both of these communities, household workers produce anchors and flour. Dockside workers: Produce 16 anchors or 4...
-
Directions: Read the newsletter Credit Cards. Complete the activities in the newsletter. These activities will not be submitted for grading. http://www.ogburn.org/PFLesson11.pdf Research and describe...
-
Using the Adjusted Trial Balance below, prepare an Income Statement for the year ended December 31. 20XX. Hinkleton Widgets Adjusted Trial Balance December 31, 20XX ACCOUNT TITLE DEBIT CREDIT Cash $...
-
The bank used by Seyvani Enterprises handles $1.02 million incollections each day and requires a $750,000 compensating balance.Seyvani is considering dividing its business between two banks,each of 2...
-
Give an example of transitory income. What effect does this income have on the marginal propensity to consume?
-
Consider the following normalized relations from a database in a large retail chain: What opportunities might exist for denormalizing these relations when defining the physical records for this...
-
What are the benefits of enforcing the integrity constraints as part of the database design and implementation process (instead of doing it in application design)?
-
Give an example, other than those described in this chapter, of a weak entity type. Why is it necessary to indicate an identifying relationship?
-
Which asset class would best satisfy the Funds diversification strategy? A. Private equity B. Private real estate C. Absolute return hedge fund Eileen Gension is a portfolio manager for Zen-Alt...
-
Based on Exhibit 2 and Parks due diligence, the pension committee should consider investing in: A. Fund A. B. Fund B. C. Fund C. Kevin Kroll is the chair of the investment committee responsible for...
-
Which of Smittands statements regarding short-biased equity strategies is incorrect? A. Statement 1 B. Statement 2 C. Statement 3 Eileen Gension is a portfolio manager for Zen-Alt Investment...
Study smarter with the SolutionInn App