Question
A) Write a query to show the list of number of orders for customers located in each country. Your query results should show Country name,
A) Write a query to show the list of number of orders for customers located in each country. Your query results should show Country name, and number of orders from the customers of that country. Partial credit (25% of the credit) will be given if you correctly identify the tables to be joined.
B) Write a query to list the orders shipped by Speedy Express. Your query should show the Order Date and Order ID. The results should appear in the sort order of Order Date.
C) Which of the three shippers Speedy Express, United Package, or Federal Shipping shipped the most number of orders? Please explain how you arrived at your response?
Is it correct these solutions below?
A)
SELECT Country,
count(Country) as NumberOfOrdersfromtheCustomers
FROM Customers
GROUP BY Country
B) I need help for the solution here
C)
SELECT
ShipperID,
ShipperName,
count(ShipperID) as Orders
FROM
(SELECT
o.ShipperID,
s.ShipperName
FROM Orders as o
JOIN Shippers as s
ON o.ShipperID = s.ShipperID)
GROUP BY ShipperID;
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