Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Data Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions