I have a table with two columns that I am using (AuthorName and CreateDT). CreateDT is in the format 2013-09-03 16:19:27.940. I need to count how many recordings each Author did each day for this year.

I tried the following code, but I get the error:Column 'FM.dbo.WORKOBJ.CreateDT' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

In my research I haven't even been able to tell for sure if that code would give me a grouping of each of 365 days or the day number of each month grouped together which I don't want.

Am I on the right track or do I need to go about this a different way?

Select CreateDT
,AuthorName
,count(*) as cnt
FROM [FM].[dbo].[WORKOBJ]
Where CreateDT >= '2013-01-01' and CreateDT <= '2013-12-31'
Group By day(CreateDT), AuthorName

Thanks for the fast reply! That did allow me to run the code without the error, however it was grouping the same day each month together. I tweaked it a bit with the following which seems to work correctly.