Sep 4, 2003 #1 Gazmysta Technical User Sep 4, 2003 18 GB Hi, Just wondering if anyone can help? Im tryin to work out the total value of stock we have using a query on a table e.g Quantity Price 62 4.95 12 3.00 43 6.72 How much stock value we have? Thanks
Hi, Just wondering if anyone can help? Im tryin to work out the total value of stock we have using a query on a table e.g Quantity Price 62 4.95 12 3.00 43 6.72 How much stock value we have? Thanks
Sep 4, 2003 #2 Norris68 IS-IT--Management Jun 19, 2002 769 GB SELECT SUM(Quantity * Price) AS StockValue FROM MyTable To list the value per stock item, SELECT ItemID, SUM(Quantity * Price) AS StockValue FROM MyTable GROUP BY ItemID Upvote 0 Downvote
SELECT SUM(Quantity * Price) AS StockValue FROM MyTable To list the value per stock item, SELECT ItemID, SUM(Quantity * Price) AS StockValue FROM MyTable GROUP BY ItemID