Moderator Candidate Score

8

Please login or register to vote for this query.

(click on this box to dismiss)

This tells you your moderator candidate score, as explained in http://meta.stackexchange.com/a/247138/164200.

Writing Meta

Q&A about the site for the craft of professional writing, including fiction, non-fiction, technical, scholarly, and commercial writing

declare @user_id int = ##UserId##
declare @rep_score as int
declare @badge_score as int

select @rep_score = cast((Reputation / 1000) as int)
from Users
where Id = @user_id

if @rep_score > 20
  set @rep_score = 20;

with BadgeList as (
  select Name
  from Badges
  where UserId = @user_id
  and Name in ('Civic Duty', 'Cleanup', 'Constituent', 'Convention', 'Copy Editor',
               'Deputy', 'Electorate', 'Enthusiast', 'Explainer', 'Investor',
               'Marshal', 'Organizer', 'Quorum', 'Refiner', 'Reviewer',
               'Sportsmanship', 'Steward', 'Strunk & White', 'Tag Editor',
               'Yearling')
  group by Name
)
select @badge_score = count(*)
from BadgeList

select @user_id as [User Link],
       @rep_score as [Reputation Score],
       @badge_score as [Badge Score],
       @rep_score + @badge_score as [Total]

Enter Parameters

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