Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MULTIPLYING BY A STOCK NUMBER 1

Status
Not open for further replies.

ptweb

Programmer
Jul 1, 2005
37
GB
Hi

I have this query to give me a totalprice...

SELECT Sum(products.Price) AS SumOfPrice
FROM products;


...how can one alter this so the SumOfPrice is the products.Price multiplied by the stock amount on a different column?? the stock column is called stock... ;-)

Many Thxs Gary
 
Code:
SELECT SUM(price * stock) AS sumofprice
FROM products

--James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top