Top users by the number of times they earned 200/day

1

Please login or register to vote for this query.

(click on this box to dismiss)

This query finds the top users by the number of times they've earned 200/day, and gives indication about the progress towards Epic and Legendary badges. Think of it as the number of times Mortarboard badge could have been earned

Physics

Q&A for active researchers, academics and students of physics

SELECT Id AS [User Link], (
	SELECT Count (TotalRep)
	  FROM (
			   SELECT 
					SUM(case votes.votetypeid 
							WHEN 1 THEN 15
							WHEN 2 THEN 10 
							WHEN 3 THEN -3
							WHEN 9 THEN BountyAmount
					 END) as TotalRep,
					 Votes.CreationDate AS CreationDate
			  FROM   Posts
					 INNER JOIN Votes
					   ON Votes.PostId = Posts.Id
						  
			  WHERE  Posts.OwnerUserId = U.Id
					 AND Posts.CommunityOwnedDate IS NULL
			  GROUP  BY Votes.CreationDate
	  ) t
	  WHERE TotalRep>=200)
FROM Users U
ORDER BY 2 DESC

Enter Parameters

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