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

  Data governance improvements

Data Governance Improvements

  What are the differences between file viruses

1. What are the differences between file viruses, boot viruses, macro viruses, and network viruses?

  Compute the global boolean or of all input values on ring

Consider an anonymous ring of size n. Each node v stores an input boolean value i(v). When the algorithm terminates, then every node is to store the output in its private variable. Every node knows n, in that n can be a part of code.

  Which type of script control structure is useful

Which type of script control structure is useful when a specific action needs to be done a set number of times? a. for b. until c. if, then, else d. while

  Create a server process that acts as a multiple client cpu

Prepare your own test data. On paper, work through your data showing Gantt charts, CPU utilization, and turnaround times. Use these same values for testing your program.

  Create a class that simulates an alarm clock

create a class that simulates an alarm clock. In this class you should *store time in hours, minutes, and seconds. Note if time is am or pm. (hint: you should have separate private members for the alarm and the clock.

  Write the complete myfnc function to return the value 1

Write the complete myfnc function to return the value 1 if they are equal and return the value 0 if they are not equal.

  Network consultation for designit

Network Consultation for DesignIT

  Write an essay on turing machine explain with examples

Write an essay on turing machine explain with examples

  Cost data incurred in processing lot quality cost data

What conclusions can be drawn from cost data incurred in processing lot, as found in the Excel workbook Quality Cost Data? Customer returns are simply scrapped and replaced.

  Better software tool internet explorer or mozilla firefox

There are several Internet browsers available today, and many people select which to use without giving it consideration. Explain which is better software tool: Internet Explorer, Mozilla Firefox, or Google Chrome?

  Software engineering code of ethics

1. "Software Engineering Code of Ethics and Professional Practice" Please respond to the following:•Describe one of the eight principles of the ACM Software Engineering Code of Ethics and Professional Practice and explain why the principle is impo..

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