Is there any way to find out the top posters from a particular month?

rated by 0 users
Answered (Verified) This post has 1 verified answer | 2 Replies | 2 Followers

Top 50 Contributor
322 Posts
Points 4,550
Daniel Rae posted on Tue, Aug 26 2008 3:27 AM

Hi all,

I do weekly and monthly reports on Community usage in our organisation and would like to report on the top posters of ap articular month. Is this possible in CS2007 or is this only available with Harvest Reporting?

Could it be done via SQL?

 

Cheers!

  • | Post Points: 20

Answered (Verified) Verified Answer

Top 10 Contributor
3,559 Posts
Points 53,735
TelligentSupportTeam
Verified by Daniel Rae

Any data obtained by Harvest can be obtained through executing a SQL script against your database.

Try the folowing for size.  N.B. requires dates in the British dd/mm/yy format, and only two digit year (although British date shouldnt' be a problem for you Wink)

SELECT     PostAuthor, COUNT(p.PostId) as PostCount
FROM         cs_Posts p
WHERE (p.PostDate < CONVERT(DATETIME, N'31/08/08', 3))
 AND (p.PostDate > CONVERT(DATETIME, N'01/08/06', 3))
 AND (p.IsApproved = 1)
 AND (p.SectionID > 2) -- Exclude PMs (0), Reporting Forums (1) and Deleted Posts(2)
GROUP BY p.PostAuthor
ORDER BY PostCount DESC

This will include all posts on the site (including weblog posts, comments, files etc).  If you want to filter by a specific application type, you can add a AND (p.ApplicationType = X) to the WHERE statement.  (Replace X with the appropiate integer value from cs_Applications)

Community Server Documentation please rate articles you read

Nintendo Wiikly | My Blog

  • | Post Points: 20

All Replies

Top 10 Contributor
3,559 Posts
Points 53,735
TelligentSupportTeam
Verified by Daniel Rae

Any data obtained by Harvest can be obtained through executing a SQL script against your database.

Try the folowing for size.  N.B. requires dates in the British dd/mm/yy format, and only two digit year (although British date shouldnt' be a problem for you Wink)

SELECT     PostAuthor, COUNT(p.PostId) as PostCount
FROM         cs_Posts p
WHERE (p.PostDate < CONVERT(DATETIME, N'31/08/08', 3))
 AND (p.PostDate > CONVERT(DATETIME, N'01/08/06', 3))
 AND (p.IsApproved = 1)
 AND (p.SectionID > 2) -- Exclude PMs (0), Reporting Forums (1) and Deleted Posts(2)
GROUP BY p.PostAuthor
ORDER BY PostCount DESC

This will include all posts on the site (including weblog posts, comments, files etc).  If you want to filter by a specific application type, you can add a AND (p.ApplicationType = X) to the WHERE statement.  (Replace X with the appropiate integer value from cs_Applications)

Community Server Documentation please rate articles you read

Nintendo Wiikly | My Blog

  • | Post Points: 20
Top 50 Contributor
322 Posts
Points 4,550

Fantastic - thanks!

  • | Post Points: 5
Page 1 of 1 (3 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com