Skip to content

ironhack-labs/lab-sql-preprocessing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

logo_ironhack_blue 7

Lab | SQL Preprocessing

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: DB schema



Instructions

  1. Select all the actors with the first name "Scarlett".
  2. How many films (movies) are available for rent and how many films have been rented?
  3. What are the shortest and longest movie duration? Name the values max_duration and min_duration.
  4. What's the average movie duration expressed in format (hours, minutes)?
  5. How many distinct (different) actors' last names are there?
  6. Since how many days has the company been operating (check DATEDIFF() function)?
  7. Show rental info with additional columns month and weekday. Get 20 results.
  8. Add an additional column day_type with values 'weekend' and 'workday' depending on the rental day of the week.
  9. How many rentals were in the last month of activity?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors