Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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

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

Advances In Databases And Information Systems 14th East European Conference Adbis 2010 Novi Sad Serbia September 2010 Proceedings Lncs 6295

Authors: Barbara Catania ,Mirjana Ivanovic ,Bernhard Thalheim

2010th Edition

3642155758, 978-3642155758

More Books

Students also viewed these Databases questions

Question

1. What are your creative strengths?

Answered: 1 week ago

Question

What metaphors might describe how we work together?

Answered: 1 week ago