How can I group only by month from a date field (and not group by day)?
Here is what my date field looks like:
2012-05-01
Here is m
Use the DATEPART function to extract the month from the date.
So you would do something like this:
SELECT DATEPART(month, Closing_Date) AS Closing_Month, COUNT(Status) AS TotalCount FROM t GROUP BY DATEPART(month, Closing_Date)