Table_Item ----------------------- ItemId ItemDescription SalePrice PurchasePrice StockAvailable 1 Biscuit half Role 20 17 45 2 Lays Chips 30 25 35 3 Soap Lux 25 22 40
Table_ItemSoldDetail -------------------------------- ItemId Invoice# QtySold 1 1 1 2 2 1 1 2 2 1 4 1 2 5 3 3 6 1
Item Sold with Count ------------------------- Item Description Total Qty Sold Biscuit half Role 4 Lays Chips 4 Soap Lux 1
SELECT i.ItemDescriptin, SUM(isd.QtySold) FROM Table_ItemSoldDetail isd JOIN Table_Items i ON i.Id = isd.ItemId GROUP BY isd.ItemId, i.ItemDescription
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)