Top answerers in a recent week with 3+ answers per day on average

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

DECLARE @PeriodDays AS int = ##PeriodDays:int?7##;

SELECT TOP 500
  u.Id AS [User Link],
  COUNT(*) AS AnswerCount,
  SUM(Score) AS TotalScore,
  AVG(Score) AS AverageScore,
  u.Reputation
  
FROM Posts AS p JOIN Users AS u
  ON p.OwnerUserId = u.Id

WHERE PostTypeId = 2
  AND p.CreationDate >= DATEADD(DAY, -3 * @PeriodDays, GETDATE())
  AND p.CreationDate < DATEADD(DAY, -2 * @PeriodDays, GETDATE())

GROUP BY u.Id, u.Reputation
HAVING COUNT(*) >= @PeriodDays * 3
ORDER BY AnswerCount DESC

Enter Parameters

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