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
OFFICES
ORDERS
PRODUCTS
SALESREPS
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started