Users With the Highest Quality Posts (filter reputation)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Enter the minimum reputation that a user must have, and this will show the users who have the highest reputation per post in that group.

Stack Overflow

Q&A for professional and enthusiast programmers

-- Users With the Highest Quality Posts (filter reputation)
-- Enter the minimum reputation that a user must have, and this will show the
-- users who have the highest reputation per post in that group.
DECLARE @MinRep int = ##MinReputation##
SELECT
    Id AS [User Link],
    Reputation,
    (SELECT COUNT(*)
    FROM posts
    WHERE posts.OwnerUserId = Users.Id
    ) AS [# Posts],
    Reputation /
    (SELECT COUNT(*)
    FROM posts
    WHERE posts.OwnerUserId = Users.Id
    ) AS [Rep Per Post]
FROM Users
WHERE Reputation > @MinRep
ORDER BY [Rep Per Post] DESC

Enter Parameters

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