Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Once data has been loaded into a database, it can be retrieved and sorted in a variety of different ways depending on the business needs.

Once data has been loaded into a database, it can be retrieved and sorted in a variety of different ways depending on the business needs. From a sales database, maybe you are interested in knowing who had the highest sales for the previous month or for the year, or maybe you want to target specific customers in one area to offer them a special deal; you can accomplishing this by querying the data stored in the database.

In this you will continue to use the data from the Week 2 Assignment to provide a sample database.

Assignment:

  1. Query for the following information:
  • List all the customers from Ada, MI.
  • List all the customers in which the sales representative is from another city.
  • List all the orders for customer 124.
  • List all the parts orders by customer 124.
  • For each sales representative, identify the number of customers, total sales of the customers and the number of parts ordered by the customers.
  1. Query one table and use WHERE to filter the results. The SELECT clause should have a column list, not an asterisk (*). State the purpose of the query; show the query and the output.
  2. Get information from at least3tables in one statement, and provide the output using the Join operator. Use ANSI Join syntax. State the purpose of the query; show the query and the output. Add a screen shot of SS Management Studio showing the query and results.
  3. Get information from2tables in one statement, and provide the output using the Left Outer Join operator. State the purpose of the query; show the query and the output. The outer join should be designed to retrieve information from the left table that has no matches in the right table. If that is not possible for your database, explain why.
  4. query using the IN keyword with a sub-query. State the purpose of the query; show the query and the output.
  5. query using an aggregate function (i.e., min, max, avg, sum, count) and the GROUP BY command. State the purpose of the query; show the query and the output.

6. query using an aggregate function (i.e., min, max, avg, sum, count) and the GROUP BY

command using the HAVING clause to filter the aggregate results. State the purpose of the

query; show the query and the output.

-Provide a query using an aggregate function (i.e., min, max, avg, sum, count) and the GROUP BY command using the HAVING clause to filter the aggregate results. State the purpose of the query; show the query and the output.

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

Management Using Practice And Theory To Develop Skill

Authors: David Boddy

8th Edition

1292271817, 978-1292271811

More Books

Students also viewed these General Management questions