In this lab, you will be using the Sakila database of movie rentals. You can follow the steps listed here to get the data locally: Sakila sample database - installation.
The database is structured as follows:
- Select all the actors with the first name ‘Scarlett’.
- How many films (movies) are available for rent and how many films have been rented?
- What are the shortest and longest movie duration? Name the values
max_duration
andmin_duration
. - What's the average movie duration expressed in format (hours, minutes)?
- How many distinct (different) actors' last names are there?
- Since how many days has the company been operating (check DATEDIFF() function)?
- Show rental info with additional columns month and weekday. Get 20 results.
- Add an additional column day_type with values 'weekend' and 'workday' depending on the rental day of the week.
- Get release years.
- Get all films with ARMAGEDDON in the title.
- Get all films which title ends with APOLLO.
- Get 10 the longest films.
- How many films include Behind the Scenes content?