haggarw3 / lab-sql-3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

logo_ironhack_blue 7

Lab | SQL Queries 3

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



Instructions

  1. How many distinct (different) actors' last names are there?
  2. In how many different languages where the films originally produced? (Use the column language_id from table film)
  3. How many movies were released with "PG-13" rating?
  4. Get 10 the longest movies from 2006.
  5. How many days has been the company operating (check DATEDIFF() function)?
  6. Show rental info with additional columns month and weekday. Get 20.
  7. Add an additional column day_type with values 'weekend' and 'workday' depending on the rental day of the week.
  8. How many rentals were in the last month of activity?

About