How about this...
If I have a table called Table1 with the following structure:
CurrentDate |
2/5/2010 |
3/6/2009 |
3/7/2008 |
4/5/2010 |
6/5/2010 |
7/5/2009 |
2/7/2001 |
2/9/2010 |
and I run the following SQL Statement:
SELECT Part1.MyMonth, Count(Part1.MyMonth) AS CountOfMyMonth
FROM (SELECT Month(CurrentDate) AS MyMonth
FROM Table1) AS Part1
GROUP BY Part1.MyMonth;
I get:
MyMonth | CountOfMyMonth |
2 | 3 |
3 | 2 |
4 | 1 |
6 | 1 |
7 | 1 |