Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write a query that displays the Company Name (customer) and the number of orders each customer has. Write a query that displays the Company

image text in transcribed

image text in transcribed

1. Write a query that displays the Company Name (customer) and the number of orders each customer has. Write a query that displays the Company Name (Customer Name) and the grand total amount in dollars each customer has only if that grand total amount is less than 10,000. Each customer will have one output line. 2. . Write a query that displays the supplier name and the number of products each supplier supplies only if that number of products exceeds 3. Write a query that displays the category name and the number of products that belong to that category for categories 3, 6 and 8 and only if the number of products exceeds 5. 4. 5. Use a SubQuery a query that displays all customer IDs that have orders that are greater than the average order in the database. Sort by customer lds in descending order. Use a SubQuerv that displays all product IDs that have a price that is greater than the average price of a product 6. Use a SubQuery to list all Employees (Employee ID) that have an average total dollar amount in orders greater the average dollar amount in orders for the Employees. Use the Orders table for this problem. Use the Totalmt column in the Orders table to get your average for each employee person and then compare each employee's average to the average for ALL employees 7. You can use a correlated sub query or an uncorrelated subquery. You need a correlated sub query if you wish to compare the average sales dollar amount to the average sales dollar amount to all the other employees NOT including the employees you are comparing to. TABLES Listed Categories Category Category Nam Description Customers Company Name Contact Name- Contact Title Postal Cod Country Phone Employees -Last Nam First Nam. Title Title Of Courte: Birth Dat Hire Dat Region Postal Cod Count Home Phone Order Details Order ProductID Unit Price Quantity Discount Orders Order DateTotalAmt Required Dat Shipped Dat Ship Via Fre Ship Name Ship Address Products Product Product Name SupplieriD , CategoryID Quantity Per Unit Unit Price Units On Order Shippers Shipper ID Company Name Phone Supplies Supplier IDCompany NameContact NameContact Title gio Postal Cod Country Phone

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_2

Step: 3

blur-text-image_3

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

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions

Question

Distinguish between filtering and interpreting. (Objective 2)

Answered: 1 week ago