Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 . Show the movie release countries for all of the movies in the movies table except for the USA. 2 . Show the director

1. Show the movie release countries for all of the movies in the movies table except for the USA.
2. Show the directors name, movie title and movie release country for all movies whose release country is NOT the USA. Use the query from #1 as a subquery to select all movies with a release country not in the USA.
3, Show the reviewer and the directors name for the movies with the highest review ratings in the 1990s order by the reviewer.
Hint: Subquery is needed.
4. Show the movies that are the only movie in their genre (In other words, show the movies that are in a genre with only one movie)
Hint: Subquery is needed
5. Select the movie title, duration, genre, and average rating for movies that had a run time of 2 hours and 45 minutes or more. Order the results in ascending order with the shortest movie at the top.
Hint: Do not use a subquery.
6. 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 e
WHERE NOT EXISTS
( SELECT *
FROM dependents d
WHERE d.employee_id = e.employee_id)
ORDER BY first_name , last_name;
7. 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, salary, department_id
FROM employees e1
WHERE salary >
(SELECT AVG(salary)
FROM employees e2
WHERE e1.department_id = e2.department_id
group by department_id);

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

Database And Expert Systems Applications Dexa 2023 Workshops 34th International Conference Dexa 2023 Penang Malaysia August 28 30 2023 Proceedings

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Atif Mashkoor ,Johannes Sametinger ,Maqbool Khan

1st Edition

303139688X, 978-3031396885

More Books

Students also viewed these Databases questions

Question

Differentiate 3sin(9x+2x)

Answered: 1 week ago

Question

Compute the derivative f(x)=(x-a)(x-b)

Answered: 1 week ago