Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For database im having a hard time with my code , What is the average sale amount for each sale reps in each office. Null
For database im having a hard time with my code What is the average sale amount for each sale reps in each office. Null should be ignored
SELECT salesrep, office, AVGsale AS avgsale
FROM orders
WHERE sale IS NOT NULL
GROUP BY salesrep, office;
For each salesrep that has made an order, list the minimum, maximum and average order amount for all their orders. Include only those orders made anytime from Omit from the list any salesrep that has only made order in this time frame. Sort the results by EmplNum.
SELECT emplnum, MINamount AS MinAmount, MAXamount AS MaxAmount, AVGamount AS AvgAmount
FROM orders
WHERE orderdate AND orderdate
GROUP BY emplnum
HAVING COUNT
ORDER BY emplnum;
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