If you have a table with a datetime column and you want to group the rows by month, then this can help:
select count(*), datediff(m, datetime_col, getutcdate())
from table
group by datediff(m, datetime_col, getutcdate())
order by 2
Thursday, February 4. 2010
Monthly statistics
Trackbacks
Trackback specific URI for this entry
No Trackbacks


