Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3 . Create a new view that shows the same information as # 2 EXCEPT it should show the average rating of each movie. Use

3. Create a new view that shows the same information as #2 EXCEPT it should show the average rating of each movie. Use the view from #2 in the FROM clause. Name the average rating column AvgRating.
4.Using the view from #3, show each genre with its avgrating.
5. Show all movies with a release year between 1970 and 1990 where the movie's genre has an average rating greater than 7.0. Only show the movie id, title, genre, and year columns
6. Show all directors who have not directed any dramas.
7. Assume there is a payment history table with a column called payment_type that indicates if a payment is regular salary, a bonus, or an award. What question does this correlated query answer? Begin your answer with "This query answers the question: who are the employees..."
SELECT employee_id, first_name, last_name
FROM employees e1
WHERE NOT EXISTS (SELECT ph.lastname
FROM payment_history ph
WHERE ph.emp_id = e1.employee_id
AND ph.payment_type =award)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Climate And Environmental Database Systems

Authors: Michael Lautenschlager ,Manfred Reinke

1st Edition

1461368332, 978-1461368335

More Books

Students also viewed these Databases questions