Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write SQL for each question by using the tables below . CUSTOMERS TABLE OFFICES ORDERS PRODUCTS SALESREPS 1) List orders over $25,000 showing the name

Write SQL for each question by using the tables below .

CUSTOMERS TABLE

image text in transcribed

OFFICES

image text in transcribed

ORDERS

image text in transcribed

PRODUCTS

image text in transcribed

SALESREPS

image text in transcribed

1) List orders over $25,000 showing the name of the customer who placed the order, the customer's salesperson, and the salesperson's office?

2) Find all orders received on the day a new salesperson was hired?

3) List all combinations of salespeople and offices where the salesperson's quota exceeds the target of any one office, regardless of which office the salesperson works in?

4) Show all salespeople who have made more than $350,000 in sales? SELF JOIN

5) List the names of salespeople and managers?

6) List salespeople with higher quotas than their managers? SUMMARY QUESTIONS

7) What are the average quotas and average sales of our salespeople?

8) What is the total quota and total sales?

9) What is the sum of the orders Bill Adams has received?

10) Calculate the average price of the products of the manufacturer ACI (MANUFACTURER)?

11) Acme Mfg. Calculate the average amount of an orders placed by (customer number 2103)? 57) What are the smallest and largest quotas assigned?

12) What is the first order date in the database? (Only this date should be listed)

13) What is the highest sales amount for each salesperson? (according to the order amount)

14) How many customers are in the database?

* (New)

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

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions