//Personal understanding, not a hw assignment So in the sample db northwind from MS there are the tables: orders o, [order details] od, customers c
- o has orderID, customerID (inc. duplicates)
- od has orderID (inc. duplicates), unitprice, quantity, discount
- c has customerID, companyName
roughly speaking, I want to join on
o.customerID = c.customerID; selecting companyName ///
join on o.orderID = od.orderID; selecting unitprice, quantity, discount
my end goal is to
sum(q (up - d)) AS 'Order Total' group by od.orderID then
sum(Order Total) group by companyName(?)
My main issue is not know how/what to join properly though.
Thanks in advance