Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using the MySQLsakila test/sample database (available at: http://mysql-tools.com/en/downloads/mysql-databases/4-sakila-db.html) please provide SQL statements for the questions in the attached picture. Question 8: Write a SQL statement
Using the MySQLsakila test/sample database (available at: http://mysql-tools.com/en/downloads/mysql-databases/4-sakila-db.html) please provide SQL statements for the questions in the attached picture.
Question 8: Write a SQL statement that lists the following information. No row should appear more than once in the output. Order your results by customer last name, then by customer first name. Include your results. customer id customer last name customer first name customer email average rental amount most recent rental date most recent return date Question 9: Write a SQL statement that gives the customer counts by country, district, and postal code. No row should appear more than once. Order your results by country then district, then postal code. Include your results. List the following information in your output: district city postal code customer count Question 10: Write a SQL statement that gives the total revenue by postal code. No row should appear more than once. Order your results by country, then district, then postal code. Include your results. List the following information in your output: district city postal code revenue
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started