Hey gang, any help will be apprecited. I am trying to do a simple count of all posts to a message board from a few particular users within the past 10 days.
I know the usernames and number of days that i want to query (10) and I want the output to display as follows....
Manager PostCount
user1 1
user2 14
user3 20
_______________ ____
The query i have is but below but there is two problems with it. They are not being grouped but rather outputing lineitem AND the DATEADD criteria does not seem to affect the result.
I am a new guy so I really do appreciate any help that you can provide.
I know the usernames and number of days that i want to query (10) and I want the output to display as follows....
Manager PostCount
user1 1
user2 14
user3 20
_______________ ____
The query i have is but below but there is two problems with it. They are not being grouped but rather outputing lineitem AND the DATEADD criteria does not seem to affect the result.
Code:
SELECT PostAuthor, COUNT(PostAuthor) AS PM_Count FROM cs_Posts GROUP BY PostAuthor, PostDate HAVING (PostDate = DATEADD(d, - 10, GETDATE())) AND (PostAuthor = N'dclecompte') OR (PostAuthor = N'haley') OR (PostAuthor = N'clapoint') ORDER BY PostDate DESC, PostAuthor
Comment