0% found this document useful (0 votes)
37 views

Assignment 4 - Joining and Advanced Multiple Table Queries

The document provides instructions for Assignment 4 which involves analyzing a Sakila database using SQL queries. It lists 5 guided queries that require writing the SQL statement and 5 query results questions that require submitting the output of the queries. The guided queries involve finding staff member with most rentals, distinct film categories, film rentals by category, actor rentals counts, and actor with most rentals. The query results questions ask about action film rentals, films rented by a customer, customer with most rentals, highest rented film rating, and date with most rental money.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Assignment 4 - Joining and Advanced Multiple Table Queries

The document provides instructions for Assignment 4 which involves analyzing a Sakila database using SQL queries. It lists 5 guided queries that require writing the SQL statement and 5 query results questions that require submitting the output of the queries. The guided queries involve finding staff member with most rentals, distinct film categories, film rentals by category, actor rentals counts, and actor with most rentals. The query results questions ask about action film rentals, films rented by a customer, customer with most rentals, highest rented film rating, and date with most rental money.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment 4

Based on the readings, lecture slides, and materials in the Module 3, answer the below
questions and submit via blackboard in a .docx or .pdf format.

To perform this assignment, you will need to use the “Sakila” database that is pre-installed, just
like we did in Module 1. Below is an attachment to the Sakila ER Diagram which is also within this
module.

Within this database, you will be using tables throughout entire model, and pick the appropriate tables
for each question for this assignment. Based on assignment readings and slides, perform each of the
following queries from the fil table.

Guided Queries: For the 5 following questions, your submission will be the query that you would write
that would return the needed result

1. Write a query that returns the Staff ID for the staff member who is involved in the most rentals.
2. Write a query that returns all the distinct list of film category names.
3. Write a query that counts the rentals of films, by category, and returns the category name and
count of rentals.
4. Write a query that returns the First_Name and Last_Name of each actor, and the count of the
number of times their films have been rented.
5. Write a query that returns the First_Name and Last_Name of the actor, and the count of the
number of time their film has been rented, of the actor with the most rentals

Query Results: For the 5 following questions, your submission will be the output of the queries.

1. How many times has an action film been rented?


2. How many films has ALICE STEWART rented?
3. Which customer has rented the most times?
4. What was the rating of the film been that has been rented the most?
5. On what Date did the most money in rentals take place?

You might also like