I'm new here. First post. I'd really appreciate some help.
I'm trying to calculate total sales for all products sold. I have a Quantity column and a Price column. I understand how to multiply these two columns, BUT I do not know how to add them all together in the same query.
Here is an example: Quantity: 2, 3, 1 Price: 2, 4, 5 I could do Quantity * Price to get: 4, 12, 5 But then how would I add 4 + 12 + 5 to get the total? I need this step to be included in the same query.
EDIT: Both the Quantity and Price columns are in the same table. SALES (Quantity, Price)
I am using Microsoft SQL-Server.