Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 1000 Bytes

File metadata and controls

25 lines (18 loc) · 1000 Bytes

lab-sql-2

In this lab you will continue using the Sakila database of movie rentals.

The ERD is pictured below - not all tables are shown, but many of the key fields you will be using are visible:


DB schema



Instructions

  1. Select all the actors with the first name ‘Scarlett’.
  2. Select all the actors with the last name ‘Johansson’.
  3. How many films (movies) are available for rent?
  4. How many films have been rented?
  5. What is the shortest and longest rental period?
  6. What are the shortest and longest movie duration? Name the values max_duration and min_duration.
  7. What's the average movie duration?
  8. What's the average movie duration expressed in format (hours, minutes)?
  9. How many movies longer than 3 hours?
  10. Get the name and email formatted. Example: Mary SMITH - mary.smith@sakilacustomer.org.
  11. What's the length of the longest film title?