In this lab, you will be using the Sakila database of movie rentals. You have been using this database for a couple labs already, but if you need to get the data again, refer to the official installation link.
The database is structured as follows:
- In the
actor
table, which are the actors whose last names are not repeated? For example if you would sort the data in the table actor by last_name, you would see that there is Christian Arkoyd, Kirsten Arkoyd, and Debbie Arkoyd. These three actors have the same last name. So we do not want to include this last name in our output. Last name "Astaire" is present only one time with actor "Angelina Astaire", hence we would want this in our output list. - Which last names appear more than once? We would use the same logic as in the previous question but this time we want to include the last names of the actors where the last name was present more than once.
- Using the
rental
table, find out how many rentals were processed by each employee. - Using the
film
table, find out how many films were released each year - Using the
film
table, find out for each rating how many films were there. - What is the average length of films for each rating? Round off the average lengths to two decimal places.
- Which kind of movies (based on rating) have an average duration of two hours or more?