Citizenship score based on certain badges and reputation

5

Please login or register to vote for this query.

(click on this box to dismiss)

Electrical Engineering

Q&A for electronics and electrical engineering professionals, students, and enthusiasts

with prelim as (select u.Id as Username, floor(10+0.5*u.Reputation/1000-0.5*abs(u.Reputation/1000-20)) as CappedRep, Count(b.Id) 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 = 'Civic Duty' or 
  b.Name = 'Cleanup' or 
  b.Name = 'Convention' or 
  b.Name = 'Copy Editor' or 
  b.Name = 'Deputy' or 
  b.Name = 'Electorate' or 
  b.Name = 'Enthusiast' or 
  b.Name = 'Explainer' or 
  b.Name = 'Investor' or 
  b.Name = 'Marshal' or 
  b.Name = 'Organizer' or 
  b.Name = 'Quorum' or 
  b.Name = 'Refiner' or 
  b.Name = 'Sportsmanship' or 
  b.Name = 'Strunk & White' or 
  b.Name = 'Tag Editor')
  group by u.Id, u.Reputation, u.LastAccessDate) 
  
select Username as [User Link], CappedRep+BadgeCount as Total, CappedRep, BadgeCount, LastAccess from prelim 
order by Total desc

Enter Parameters

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