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
-
In what ways might the original capital required to establish an Internal Service Fund be acquired?
-
Classify each of the performance measures below into the most likely balanced scorecard perspective it relates to. Label your answers using C (customer), P (internal process), I (innovation and...
-
The opportunities for business consulting in the areas of corporate planning, budgeting, and strategy are almost limitless as new, more powerful software continues to be developed. This exercise...
-
Hamilton Corp. manufactures a component used in a popular gaming console. Demand has been strong and the executive staff at Hamilton is planning for next year. On October 1, they call you into a...
-
A survey of 2275 adults in a certain large country aged 18 and older conducted by a reputable polling organization found that 415 have donated blood in the past two years. Complete parts (a) through...
-
2. A double-spool turbofan engine is used to power an aircraft flying at speed of 250 m/s at an altitude of 11,000 m, where ambient temperature is -50C and pressure is 22.7 kPa. As shown below, the...
-
7. Among the mentioned above solvents choose the most polar solvent and write why you chosen this one: a) thyl acetate: b) hexane; c) chloroform; d) diethyl ether;
-
Write a sqlite3 program that creates a database test.db with a table horse_table with columns horse (text, the name of a horse) and age (int, the age of the horse). On the file data, txt, whose...
-
Hello, Profs. Please, I am currently working on a c# project "Eternal Quest program" to track various kinds of goals. However, I am faced with a syntax error in line 260 "(field) static Goal...
-
7-7 Justice System is purchasing a new bar code-scanning device and the table below relevant cost items for the purchase. The operating expenses are $14,000 per year, the estimated annual revenue is...
-
Search for a news article online. The article should be about a sector or industry within a country that has been (or could be) negatively affected by the decision of the country to open to free...
-
Considering the purchase of a machine that would cost $ 4 1 0 , 0 0 0 and would last for 5 years, at the end of which, the machine would have a salvage value of $ 4 1 , 0 0 0 . The machine would...
-
Ludolph Industries has an annual plant capacity of 63,000 units; current production is 50,000 units per year. At the current production volume, the variable cost per unit is $31.00 and the fixed cost...
-
Government is advised to tax goods whose demand curves are inelastic if the goal is to raise tax revenues. If the goal is to discourage consumption, then it ought to tax goods whose demand curves are...
-
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?
-
Simple numbers are used in this problem to highlight the concepts covered in the chapter. Assume that the Canberra Company produces one producta bath mat that sells for $10. Canberra uses a...
-
The Trapani Company had the following actual data for 2006 and 2007: The basic production data at standard unit costs for the two years were Fixed factory overhead was budgeted at $98,000 per year....
-
The Carley Company differs from the Marple Company (described in Problem 4-21) in only one respect: it has both variable and fixed manufacturing costs. Its variable costs are $0.14 per litre and its...
Study smarter with the SolutionInn App