List of top users ranked by highest "Average Rep earned per Answer"

0

Please login or register to vote for this query.

(click on this box to dismiss)

Lists the 100 top users ranked by their average rep per answer

Stack Overflow

Q&A for programmers

set nocount on

declare @minRep numeric = 1000
declare @minAns numeric = 50

declare @UserStats table (OwnerUserId int, answerCnt int)
insert @UserStats
select
    u.Id,
    answerCnt = count ( p.Id )
from
    Posts p join Users u on u.Id = p.OwnerUserid
where
    u.Reputation > @minRep
group by
    u.Id

set nocount on

select 
   top 100000 answerCnt as [answer cnt],
   u.DisplayName as [Display name],
   u.Reputation as [Reputation],
   u.Reputation / answerCnt as [Avg Rep per answer]
from 
   @UserStats s, 
   Users u
where u.Id = s.OwnerUserId and
   answerCnt > @minAns
order by [Avg Rep per answer] desc

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached