Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Movies Database: Find duplicate rentals Your company runs an online video store,

ID: 3721550 • Letter: M

Question

Movies Database: Find duplicate rentals Your company runs an online video store, where customers can rent movies for online viewing All data of the video store website is available in a MySQL database called rentamovie , which you can explore and query Write a SQL query that retrieves repeated rentals in which the same customer rents the same movie more than oncee Show only the customer's name and the movie's title, for example, John Spencer Vertigo Julia Williams The Lady Eve Rebecca Smith The Lion King Robin Kostas Groundhog Day If a customer rents the same movie multiple times, the output should show this (customer's name, movie's title) combination only once.

Explanation / Answer

As the database schema is not given, Assuming the below schema for the database rentamovie

customer table: (customer_id, customer_name, country, created_date)

movie table: (movie_id, movie_title, duration, release_year)

rental table: (rental_id, customer_id, movie_id)

We need to query repeated rentals where same customer rents same movie more than once.

Below is the query::

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote