Question
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 correct.
Customers CustomerId CustomerName ContactName Address City PostalCode Country Shippers Shipper ID Shipper Name Phone Orders OrderId Customer Id Employeeld OrderDate ShipperID Order Details Order DetailID Order ID ProductID Quantity Suppliers SupplierID SupplierName Contact Name Address City PostalCode Country Phone Products ProductID ProductName SupplierID categoryId Unit Price
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