Distribution of Users Creation by Month with Rep and Votes

0

Please login or register to vote for this query.

(click on this box to dismiss)

Show 100+ rep, 50+ vote, and 10+ vote/month users

Moderators

Q&A for community managers, administrators, and moderators

-- Distribution of Users Creation by Month with Rep and Votes
-- Show 100+ rep, 50+ vote, and 10+ vote/month users

select COUNT(1) as [All Users], 
       SUM(CASE WHEN Reputation >= 100 THEN 1 ELSE 0 END) as [100+ Rep Users], 
       ((100 * SUM(CASE WHEN Reputation >= 100 THEN 1 ELSE 0 END))/COUNT(1)) as [Rep%],
       SUM(CASE WHEN Upvotes + Downvotes >= 50 THEN 1 ELSE 0 END) as [50+ Votes],
       ((100 * SUM(CASE WHEN Upvotes + Downvotes >= 50 THEN 1 ELSE 0 END))/COUNT(1)) as [Vote%],
       SUM(CASE WHEN ((Upvotes + Downvotes)/DateDiff(Month, CreationDate, GETDATE())) >= 10 THEN 1 ELSE 0 END) as [10 Votes/Mo],
       ((100 * SUM(CASE WHEN ((Upvotes + Downvotes)/DateDiff(Month, CreationDate, GETDATE())) >= 10 THEN 1 ELSE 0 END))/COUNT(1)) as [10 Vote%],
       Month(CreationDate) as Month, 
       Year(CreationDate) as Year
from Users
group by  Month(CreationDate), Year(CreationDate)
order by Year(CreationDate), Month(CreationDate)

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results