Question
Write SQL advance query using joins and subselect that answers each question below using the movie rental database schema provided below Your submission will be
Write SQL advance query using joins and subselect that answers each question below using the movie rental database schema provided below
Your submission will be graded using two factors:
- A correctly formed SQL query that answers the specific question asked (no extra rows or columns).
Providing the correct answer to the question (the results returned from MySQL Workbench).
- Who has starred in movies in the French language? Return only the first five distinct results in alphabetical order by last name. (Hints: (1) Create the query to only return the first five, in alphabetical order by last name; (2) Be sure to reference the language name French in your query. In the language table, there is a field name that contains the film language names.)
Display: first name and last name
- Who has rented the fewest movies? How many movies did they rent? (Hint: Get a list of all customers and the number of movies they rented, arranged in ascending order and returning only the first row. Assume no ties - theres only one customer with the lowest value.)
Display: first name, last name and number of movies
- Which are the languages of the movies that Mabel Holland has rented and how many has she rented in each of those languages?
Display: language and number of languages
- What is (are) the shortest R-rated movie(s) in English? And how long is it (are they)? (Hint #1. R-rated movies have rating value equal to R;
Hint #2: There might be more than one movie returned. Use a subselect with the MIN() function to return only the shortest R-rated movie(s). )
Display: movie title and movie length
- What was the shortest movie starring Daryl Crawford, how long is it, and what was its rating? (Hint: There might be more than one movie returned. Use a subselect with the MIN() function to return only the movie with the shortest length starring Daryl Crawford.)
Display: movie title, length and rating
H film film id title description release_year language_id original_language film actor filmactor_id actor_id film_id last update actor actor_id first_name last_name last_update id inventory Hinventory_id film_id store_id last_update rental duration rental_rate length replacement_cost rating spcial_features last_update language language_id name last_update rental rental id rental_date inventory_id customer_id return_date staff_id last_update customer customer_id store_id first_name last name email address_id active address address id address district postal_code phone last_update create_date last_update H film film id title description release_year language_id original_language film actor filmactor_id actor_id film_id last update actor actor_id first_name last_name last_update id inventory Hinventory_id film_id store_id last_update rental duration rental_rate length replacement_cost rating spcial_features last_update language language_id name last_update rental rental id rental_date inventory_id customer_id return_date staff_id last_update customer customer_id store_id first_name last name email address_id active address address id address district postal_code phone last_update create_date last_updateStep 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