SQL

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 :

(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