-
Determining Total Sales
I am attempting to calculate the total sales from two columns. One column is the quantity of the particular item and the other column is entitled price. I need to calculate the total sales price between these two columns. I tried entering the string as:
select sum(quantity)*(price) from my database.
Is this the correct equation for calculating total sales?
Thanks,
Ron
-
quantity*price will give you total sales for the each row
sum(quantity*price) will give you total sales for the entire table
sum(quantity*price) with a group by clause will give you total sales for the entire group
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|