View Full Version : How can I count money, not records?


se7enhu
09-17-2008, 12:52 PM
Hey guys Im trying to use the count function to count money, not the amount of records. I got this -


SELECT Count(C.Price) AS [Total Price], Count(C.Cost) AS [Total Cost], Count(C.Price) - Count(C.Cost) AS [Profit]
FROM Camera C, Brand B
WHERE C.AmountPaid = C.Price AND Month(C.DateSold) = 5 AND Year(C.DateSold)=2008;


Where am I going wrong?



Thanks.

Brianwarnock
09-17-2008, 12:56 PM
Try summing it.

Brian

se7enhu
09-17-2008, 01:07 PM
thanks man