SQL
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
5 years ago 10
Purchase the answer to view it
- Proff.VenaWells
- Bus 433 Discussions Question 1 & 2
- Summarizing an article - APA Style
- Math( collage algebra reviwe questions) 5 stars tutor
- Monetary and Fiscal Policy Applications - Assignment
- Identify two popular multi-vitamin formulas and list the ingredients of each. Compare the ingredients with one another. Why do you...
- 35663
- cours project Part3 and4
- HW 30 , 31, 32
- need someone who can start on this now