Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question1: This question has three parts. You can Download the Database (Titled: Northwind sample database for MS SQL Server) and see the tables by visiting

Question1: This question has three parts.

You can Download the Database (Titled: Northwind sample database for MS SQL Server) and see the tables by visiting the following website:

http://www.zentut.com/sql-tutorial/sql-sample-database/

Part 1) Write a query that returns the number of orders by shipperid (this is the ShipVia column in the Orders table) per product category. Use an ORDER BY, but you will need to remove the ORDER BY in future steps. The result should look like:

image text in transcribed

Part 2) Now we want to determine the lowest number of orders per product category by any shipper. Hint: A SELECT statement (like the one from #1 above) can be used as a table in the FROM clause, just put () around the SELECT and give it a table alias. The result should look like:

image text in transcribed

Part 3) Now the big question, which shipper shipped the least number of orders per category, and how many orders was that? The result should look like:

image text in transcribed

CategoryName ShipVia OrderCount Beverages Beverages Beverages Condiments Condiments Condiments Confections Confections Confections Dairy Products I Dairy Products 2 Dairy Products 3 Grains/Cereals 1 Grains/Cereals 2 Grains/Cereals 3 Meat/Poultry 1 Meat/Poultry 2 Meat/Poultry 3 Produce Produce Produce Seafood Seafood Seafood 122 164 118 72 2 100 133 101 115 143 108 2 72 57 39 57 40 95 133 102 2 2

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

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions