Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this project, you will write queries to perform tasks using the Sakila database. The tasks listed below will tell you what each query needs

For this project, you will write queries to perform tasks using the Sakila database. The tasks listed below will tell you what each query needs to produce. You must turn in your SQL statements for each query, followed by a screenshot showing the resulting table from your MySQL Workbench. If you do not know how to take a screenshot, please get in touch with your instructor. There are five queries to complete. Each SQL statement with a screenshot is worth 10 points for a total of 50 points for this assignment.
Write a SELECT statement that lists the actor number, last name, and first name of all actors whose first name starts with the letter K. Order the results by last name.
Write a SELECT statement listing only the distinct last names in the Actor table, sorted by last name. Show a count of how many actors have that last name.
Write a SELECT statement to select the Actor's first name, last name, and the count of films they have appeared in. Display all actors, whether or not a film is available.
Write a SELECT statement to create a list of films and their categories with the category ID, category name, and the film title. Unassigned categories (category ID is NULL) should not appear in the list.
Write a SELECT statement to select the film title and rental duration for only films with an above-average rental duration. Order the results by rental duration(ascending).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions