Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
