QUIZ? Please review provided ERD for Sales in?****database.? Only Assumptions?: Total order quantity?is:?sum
Need help with this assignment?Get an original answer from a qualified tutor — from $10/page.
Get it written →QUIZ
Please review provided ERD for Sales in ****database.
Only Assumptions :
Total order quantity is: sum(quantityOrdered ) as Qty,
TotalAmount is: sum(priceEach*quantityOrdered) as total
construct SQL statement joining all necessary tables, RUN it and choose correct result.
EXAMPLE of possible sql to find TotalAmount for officeCode = 1 :
select sum(od.priceEach * od.quantityOrdered) as total , of.officeCode
from yhelen.orders o join yhelen.orderdetails od on o.orderNumber = od.orderNumber
join yhelen.products p on p.productCode = od.productCode join
yhelen.customers c on c.customerNumber = o.customerNumber join
yhelen.employees e on e.employeeNumber = c.salesRepEmployeeNumber join
yhelen.offices of on of.officeCode = e.officeCode
group by 2
Get a plagiarism-free answer to this question
Send us your instructions and we’ll match you with the best writer in your subject.
- 100% human-written, zero AI
- Turnitin report included
- Confidential — we never share your data
- Free revisions & refunds