Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For the questions below, use the W3Schools customer orders database. You need to submit thoroughly tested SQL statements. For your convenience and reference, relevant data

For the questions below, use the W3Schools customer orders database. You need to submit thoroughly tested SQL statements. For your convenience and reference, relevant data model is attached as a PDF document with the assignment in the Blackboard. Name of this document is "Relationship diagram for W3schools order.pdf."

1) Write a query to show Customers Country wise sales totals. Your query should show Customers Country name and the total sale value for that Country.

2) Write a query to show Product wise sales totals. Your query should Product name and the total sale value for that Product.

3) Write a query to show the number of orders for each shipper. Your query should show shipper name and the count of orders with the shipper.

4) Write a query to show number of products in each product category. Your query should show Category name and number of products in that category.

5) Write a query that shows Customers country wise customer count, and order count. Your query should show country name, total number of customers from that country, and total number of orders from the customers of that country.

6) Write a query that shows the number of products supplied by each Supplier. Your query should show Country name, supplier name and the count of products supplied by that supplier. Note: Sale Price = Orderdetails.Quantity * Products.price (see an example in the class slides deck) W3SCHOOLS SQL is located at http://www.w3schools.com/sql/default.asp (Preferred browser is Chrome).

On this page you will find a button called Try it yourself. Click on that button. You will be redirected to a page where you see a list of tables on the right side of the page. It is highly recommended to click Restore Database button on this page during every session. The page contains a box where you can type in an SQL statement involving the listed tables. You type in your SQL statement in that box and click on Run SQL button. The results will be displayed if your SQL statement is syntactically correctimage text in transcribed

Customers Customer Id Customer Name ContactName Address City PostalCode Country Shippers Shipper ID ShipperName Phone Orders Order Id Customer Id Employeeld Order Date ShipperID Order Details Order DetailID Order ID ProductID Quantity Suppliers Supplier ID Supplier Name ContactName Address City PostalCode Country Phone Products ProductID Product Name Supplier ID So, Category Id Unit Price Categories LA category Categoy Name Desc rhom

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

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions

Question

=+ ^ What is the budget for this project?

Answered: 1 week ago