View Single Post
Old 01-24-2007, 03:51 AM  
Natural Cause
Confirmed User
 
Join Date: Oct 2006
Location: AIM: NaturalCause911
Posts: 222
SELECT SUM(TotalPrice) AS [TotalPrice], COUNT(OrderID) AS [Sales], MONTH([Date]) AS [Month], YEAR([Date]) AS [Year]
FROM [Order]
WHERE OrderStatusID = 4 -- Complete
GROUP BY Month([Date]), YEAR([Date])

I just wrote that, nice and simple and it tells me how much ive made for each month of each year
Natural Cause is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote