Slow and Steady

1

Please login or register to vote for this query.

(click on this box to dismiss)

Code Review

Q&A for peer programmer code reviews

select top ##TopX:int?1000##
Rank() over (order by count(*) desc) as Rank,
       Users.Id as [User Link],
       Users.DisplayName as [Name Sorter],
       Users.Reputation,
       Count(*) as AnswerCount,
       Sum(Score) as AnswerScore,
       Convert(Decimal(8,4), (1.0 * Count(*)) / DateDiff(dd, DateAdd(month, - ##Months:int?6##, GetDate()), GetDate())) as PerDay,
       Convert(Decimal(8,4), (1.0 * Sum(Score)) / Count(*)) as AvgScore
from Users inner join Posts on Posts.OwnerUserId = Users.Id
where Posts.PostTypeId = 2
  and Posts.CreationDate >= DateAdd(month, - ##Months:int?6##, GetDate())
  and Users.Reputation >= ##MinRep:int?1000##
group by Users.Id, Users.DisplayName, Users.Reputation

Enter Parameters

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