Question
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:
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:
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:
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 2Step 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