I was hoping for 1 row for each itemcode. I'm getting many.
Goal was-> For all clients, all orders...how much did we sell of each item?
? Any help welcome.
SELECT customers.custID,
orders.orderID,
items.itemcode,
( items.pricequote * items.quantity ) As LineValue
FROM customers, orders, items
WHERE
customers.custID = orders.custID
AND orders.orderID = items.orderID
GROUP BY customers.custID,
orders.orderID,
items.itemcode,
items.pricequote,
items.quantity
ORDER BY 4 DESC, items.itemcode, customers.custID
Goal was-> For all clients, all orders...how much did we sell of each item?
? Any help welcome.
SELECT customers.custID,
orders.orderID,
items.itemcode,
( items.pricequote * items.quantity ) As LineValue
FROM customers, orders, items
WHERE
customers.custID = orders.custID
AND orders.orderID = items.orderID
GROUP BY customers.custID,
orders.orderID,
items.itemcode,
items.pricequote,
items.quantity
ORDER BY 4 DESC, items.itemcode, customers.custID