I have a simple table. We'll call it ContactInfo. I want to simply group the contacts by month, and output the sum of each month. I'm using ColdFusion, so I really just want to output the following:
March 03 - 34 Submissions April 03 - 12 Submissions May 03 - 8 Submissions June 03 - 43 Submissions Etc Here's what I've got that's so far giving me fits: SELECT Name, Email, Type, DatePosted, COUNT(*) AS num_contacts FROM ContactInfo GROUP BY DATEPART(mm, DatePosted) ORDER BY DatePosted And it's just not working against SQL Server 2000. I'm just all kinds of stumped. I dunno if I need to group the output, or what. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2604 Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6
