How many different customers have ordered products

Assignment Help Basic Computer Science
Reference no: EM13718188

Fully qualify all your field names. Rename and order as appropriate.

For this assignment, you'll have to answer some fairly complex queries. I'm going to ask the question first, then ask sequence of questions to lead you up to the big query. Hopefully, you'll get some practice with how to approach a bigger, more complex query.

How many different customers have ordered products in each category? Two columns, categoryname and count of distinct customers. Make sure to include EVERY category.

  1. Show the CategoryName and ProductName of every product. Order by CategoryName
  2. Copy #1. Show CategoryName, ProductName, and Discount for every product on every order detail. (JOIN in the [Order Details] table)
  3. Copy #2.Show the CategoryName, ProductName, and CustomerID for every Order Detail. (JOIN in the Orders table, and show the CustomerID from the Orders table)
  4. Copy #3. Make this change. In the FROM statement, separate out the JOINs of Products, [Order Details] and Orders from the Categories. So it will look something like this:
FROM        Categories 
INNER JOIN (  Products 
INNER JOIN    [Order Details] ON ...
INNER JOIN    Orders          ON ... 
           )                  ON Categories.CategoryID = Products.CategoryID
  1. Copy #4. Now make sure that EVERY Category is shown, even those that don't match up with a Product/Order. (Just change one of te INNER JOINs to a LEFT JOIN. You should see some NULLs appear in ProductName, Discount,etc.)
  2. Copy #5. Show the CategoryName, and the count of the number of CustomerIDs.
  3. Copy #6. Show the CategoryName, and the DISTINCT count of the number of CustomerIDs. (This answers the original question)

Give a count of orders by sales region and category for the year 1997. Three columns, Region.RegionDescription, CategoryName, CountOfOrders.

  1. Show a list of Regions and the names of employees that have territories in those regions.
  2. Copy #1. Show a list of Regions, and OrderIds from Orders in 1997 from each region.
  3. Copy #2. Show a list of Regions, and ProductIDs from Orders in 1997 from each region.
  4. Copy #3. Show a list of Regions, and the Category Name of Products from Orders in 1997 from each region.
  5. Copy #4. Show the Region, Category, and Count of Orders in 1997.
  6. Copy #5. Show the DISTINCT count of orders.

Reference no: EM13718188

Questions Cloud

Determine how high will the block rise into the air : A gun fires a bullet vertically into a 1.40-kg block of wood at rest on a thin horizontal sheet. how high will the block rise into the air after the bullet becomes embedded in it
Determine the entropy change of nitrogen during this process : A piston-cylinder device contains 1.101 kg of nitrogen gas at 120 kPa and 27 degrees C. The gas is now compressed slowly in a poly tropic process which PV^(1.38) = constant. The process ends when the volume is reduced by one-half. Determine the entro..
How fast is the flowerpot moving in two seconds : A flowerpot falls from a windowsill 25 m above a sidewalk. How fast is the flowerpot moving in 2 seconds
Examine specific ways and events : Discussion, examine specific ways, events, characterizations, places, times, imagery, symbolism, etc., unfolds the story of the myth or folktale or satire.
How many different customers have ordered products : How many different customers have ordered products in each category? Two columns, categoryname and count of distinct customers. Make sure to include EVERY category.
Estimate what will be their speeds after the collision : Two billiard balls of equal mass undergo a perfectly elastic head-on collision. what will be their speeds after the collision
Adiabatic compressor with an isentropic efficiency : Air is compressed from 100 kPa and 20C to 700 kPa in an adiabatic compressor with an isentropic efficiency of 90%. Assuming that the mass flow rate is 0.1 kg/s determine the power input to this compressor, in kW, and the rate of entropy generated. Us..
What is the index of refraction of octane : The speed of light in octane is 2.14×108m/s. What is the index of refraction of octane
Evaluate the speed of the puck after the collision : A 0.450-kg ice puck, moving east with a speed of 5.26m/s , has a head-on collision with a 0.950-kg puck initially at rest. What is the speed of the 0.950-kg puck after the collision

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd