Most effective users

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT TOP 100
  Users.Id as [User Link],
  COUNT(1) as [Post Count],
  Users.Reputation,
  Users.Reputation / COUNT(1) as [Avg Rep per Post]
FROM
  Users
INNER JOIN
  Posts
    ON Users.Id = Posts.OwnerUserId
    AND Posts.PostTypeId IN (1,2,3)
GROUP BY
  Users.Id,
  Users.Reputation
HAVING
  COUNT(1) > 1
ORDER BY
  [Avg Rep per Post] DESC

Enter Parameters

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