Question: 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

Write SQL for each question by using the tables below . CUSTOMERS

OFFICES

TABLE OFFICES ORDERS PRODUCTS SALESREPS 1) List orders over $25,000 showing the

ORDERS

name of the customer who placed the order, the customer's salesperson, and

PRODUCTS

the salesperson's office? 2) Find all orders received on the day a

SALESREPS

new salesperson was hired? 3) List all combinations of salespeople and offices

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!