Hello here's my query:
SELECT SalesH.SKU, SalesH.UPC, SalesH.Artist, SalesH.ItemName, SUM(SalesH.Quantity) AS Totalsold, Items.StockQty, SalesH.Attribute2 As format, SalesH.ReleaseDate, SalesH.Cost*Totalsold as Totalmade
FROM SalesH inner join Items on SalesH.ItemID = Items.ItemID
WHERE (SalesH.ReleaseDate = '03/12/2013') AND (SalesH.TDTypeID = 1) AND (SalesH.TID = 1)
GROUP BY SalesH.upc,SalesH.SKU, SalesH.Artist, SalesH.ItemName, SalesH.Attribute2, SalesH.ReleaseDate, Items.StockQty, SalesH.Cost, Totalsold
ORDER BY SalesH.Artist
What I'm trying to do is have sql give me the cost times totalsold (which is SUM(SalesH.Quantity)). So how would I go about wording that so sql understands. Right now it brings up the Totalmade column as null.