Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Part B (Database reproduced here for your convenience) Consider the following da

ID: 3919760 • Letter: P

Question

Part B (Database reproduced here for your convenience) Consider the following database that contains information about the orders placed by a firm's customers Part (PartNo, Desc, PartType, QOH, ListPrice Orderline (PartNo, OrderNo, COrdered, OrdPrice) Order (OrderNo OrdDate, CustNo) Customer (CustNo, CustName, CustTel) Q2. What is the total dollar value of the orders placed for each PartType based on the ListPrice that goes with the part (not OrdPrice). Report PartType, TotalValue. You must label the output columns exactly as stated here. Keep in mind that value is based on price x quantity. PartType examples include-AP (appliances), EL (electronics), FD (food items), and few others. Include all PartTypes even if not ordered yet with a TotalValue of Zero.

Explanation / Answer

If you have any doubts, please give me comment...

SELECT PartType, SUM(QOrdered*ListPrice) AS TotalValue

FROM Part P, OrderLine OL

WHERE P.PartNo = OL.PartNo

GROUP BY PartType;