Question
Help with SQL questions using the following schema List store id, film title, and a count of how many times each film was rented at
Help with SQL questions using the following schema
-
List store id, film title, and a count of how many times each film was rented at each store in 2006. Sort by store id then film title.
-
(Hint: Use the rental count column in the rental fact table. Join the rental fact to the dimension tables you need. Use the rental date key in the fact table to join the date dimension. DO NOT use the year() function on the rental date key in the fact or dimension tables. Instead, use columns in the date dimension table that already extract the year from the date.)
-
-
How many rentals did each store achieve for each month in 2005? Sort by store and month.
-
(Hint: As in question 1, do not extract the month or year from the rental date key. Use columns in the date dimension that already have the month and year extracted from the date.)
-
-
List the top 5 films by total rental count in May 2005. Dont worry about ties just output 5 rows. Include the film title and the total number of times it was rented in that month. Order by the number of rentals in decreasing order.
Step 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