QUIZ
Please analysis provided ERD for Sales in ****database.
Only Assumptions :
Total adjustment quantity is: sum(quantityOrdered ) as Qty,
TotalAmount is: sum(priceEach*quantityOrdered) as total
construct SQL account abutting all all-important tables, RUN it and accept actual result.
EXAMPLE of accessible sql to acquisition TotalAmount for officeCode = 1 :
select sum(od.priceEach * od.quantityOrdered) as absolute , of.officeCode
from yhelen.orders o accompany 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
Order a unique copy of this paper