Election Candidate Score Leaderboard


Please login or register to vote for this query.

(click on this box to dismiss)


Q&A for those using, extending or developing Emacs

WITH prelim AS 
   SELECT u.Id AS Username, 
      u.Reputation AS Reputation,
      Floor(10+0.5*u.Reputation/1000-0.5*Abs(u.Reputation/1000-20)) AS CappedRep, 
      Count(distinct b.Name) AS BadgeCount, 
      u.LastAccessDate AS LastAccess 
   FROM Users u
   INNER JOIN Badges b ON b.UserId = u.Id
   WHERE u.Reputation >= 1000 AND 
     b.Name IN (
         'Civic Duty', 
         'Copy Editor',
         'Strunk & White',
         'Tag Editor',
   Group BY u.Id, u.Reputation, u.LastAccessDate
   Username AS [User Link], 
   CappedRep+BadgeCount AS Total, 
   CappedRep, BadgeCount, LastAccess 
FROM prelim 
ORDER BY Total DESC, Reputation DESC

Enter Parameters

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