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.
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.