Moderator Election Score for all eligible candidates with score > 1

3

Please login or register to vote for this query.

(click on this box to dismiss)

Moderator Election Score calculation as per http://meta.stackexchange.com/a/247138/260340 and http://meta.stackexchange.com/a/252643/260340 The score is made up of up to 20 points for each 1k reputation, plus 20 badges.

Ask Ubuntu

Q&A for Ubuntu users and developers

--MinRep: Minimum reputation

Select Username as [User Link], CappedRep+BadgeCount as Total, Reputation, CappedRep, BadgeCount, ModBadges, EdBadges "EditingBadges", ParticipationBadges, CensusBadges
From (
   Select u.Id As Username, 
     (case when u.Reputation > 20000 then 20000 else u.Reputation end)/1000 As CappedRep, 
     u.Reputation as Reputation,
      Count(distinct case when b.Name in (
         'Civic Duty', 
         'Cleanup',
         'Constituent',
         'Convention',
         'Copy Editor',
         'Deputy',
         'Electorate',
         'Enthusiast',
         'Explainer',
         'Investor',
         'Marshal',
         'Organizer',
         'Quorum',
         'Refiner',
         'Sportsmanship',
         'Strunk & White',
         'Tag Editor',
         'Reviewer',
         'Steward', 
         'Yearling') then b.Name else null end) As BadgeCount, 
      
      count(distinct iif(b.Name in ('Civic Duty', 
         'Cleanup',
         'Deputy',
         'Electorate',
         'Marshal',
         'Sportsmanship',
         'Reviewer',
         'Steward'), b.Name, null)) ModBadges,
      count(distinct iif(b.Name in (
         'Constituent',
         'Convention',
         'Enthusiast',
         'Investor',
         'Quorum',
         'Yearling'), b.Name, null)) ParticipationBadges,
      count(distinct iif(b.Name in (
         'Organizer',
         'Copy Editor',
         'Explainer',
         'Refiner',
         'Tag Editor',
         'Strunk & White'), b.Name, null)) EdBadges,
      count(distinct iif(b.Name in (
         'Civic Duty', 
         'Convention',
         'Deputy',
         'Strunk & White'), b.Name, null)) CensusBadges   
         
      
   From Users u
   left join Badges b on b.UserId=u.Id
   Where u.Id in (SELECT UserId FROM Users WHERE Users.Reputation > = ##MinRep:int?300## 
   )
   
  Group By u.Id, u.Reputation
) cscores
WHERE CappedRep+BadgeCount > 0
AND Reputation > = ##MinRep:int?300##  and CensusBadges=4
--AND UserID in 
Order By Total desc

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results