For questions 4, 5 and 6, please use the W3Schools customer orders database. You
ID: 3820507 • Letter: F
Question
For questions 4, 5 and 6, please use the W3Schools customer orders database. You need to submit thoroughly tested SQL statements.
4) Please indicate the name of the shipper that shipped most number of orders.
5) Please indicate the product category wise sales totals. Your query should show the category name and total sale value for that category.
6) Please indicate the name of the product that has most number of orders.
4) Please indicate the name of the shipper that shipped most number of orders. 5) Please indicate the product category wise sales totals. Your query should show the category name and total sale value for that category 6) Please indicate the name of the product that has most number of ordersExplanation / Answer
First let me inform you that as you mentioned in this question, I referred W3Schools customer orders database and found answers to your question
Ans4) So as shown in this class diagram to indicate the name of the shipper that shipped most number of orders We need to count shipper's order. There are 3 available there with Shipper_id=> 1,2,3
So as I found that shipper 2 gave maximum order, if you need to consider quantity too then we need to go to orderDetails table too. So answer is if we are considering only number of orders then by manual counting 2 is maximum whose name is "United Package" but with quantity also we need to use query in this case. Also firing query instead of manual counting would be great for that you need whole database in your local or connect with W3Schools customer orders database and then fire "find" query
Queries are as below
SELECT * FROM [Orders] where ShipperID=3 ===> 68
SELECT * FROM [Orders] where ShipperID=2==> 74
SELECT * FROM [Orders] where ShipperID=1==>54
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.