how does one SUM up 2 columns and multiply it with another column.
[CODE=sql]
Select Sum(sellingpric e-buyingprice)*qu antity from orders where date = '2008/01/30'
[/CODE]
When i do this it gives me an error, telling me that the orders.quantity is not in an aggregate function or not in a GROUP BY clause
when i change the statement to
[CODE=sql]
Select Sum(sellingpric e-buyingprice)*qu antity from orders where date = '2008/01/30' GROUP BY sellingprice
[/CODE]
then it doesnt sum up the totals.......it gives the totals for each row......
i want the sum of the entire column
please HELP....
[CODE=sql]
Select Sum(sellingpric e-buyingprice)*qu antity from orders where date = '2008/01/30'
[/CODE]
When i do this it gives me an error, telling me that the orders.quantity is not in an aggregate function or not in a GROUP BY clause
when i change the statement to
[CODE=sql]
Select Sum(sellingpric e-buyingprice)*qu antity from orders where date = '2008/01/30' GROUP BY sellingprice
[/CODE]
then it doesnt sum up the totals.......it gives the totals for each row......
i want the sum of the entire column
please HELP....
Comment