Reputation from Questions

2

Please login or register to vote for this query.

(click on this box to dismiss)

Ranks users by reputation from questions (estimated by using the post score). This query is definitely broken by bounties as they are not accounted for in the percentage calculation.

Stack Overflow

Q&A for professional and enthusiast programmers

-- Reputation from Questions
-- Ranks users by percentage of reputation from questions (estimated)

SELECT
    TOP 500
    Users.Id AS [User Link],
    Users.Reputation AS [Total Rep],
    ROUND(CAST((SUM(Posts.Score)*5 + COUNT(Posts.AcceptedAnswerId)*2) AS FLOAT) / Users.Reputation * 100, 1) AS [Question Rep Estimate %],
    COUNT(Posts.Id) AS [Questions Asked],
    SUM(Posts.Score) as [Total Score],
    COUNT(Posts.AcceptedAnswerId) as [Answers Accepted]
FROM
    Users
  INNER JOIN
    Posts ON Posts.OwnerUserId = Users.Id
WHERE
   Users.Reputation > ##ReputationFloor## AND
   Posts.PostTypeId = 1 AND
   Posts.CommunityOwnedDate IS NULL AND
   Posts.ClosedDate IS NULL
Group By
    Users.Reputation, Users.Id
Order By
    [Question Rep Estimate %] DESC, [Total Rep] ASC, [Questions Asked], [Total Score], [Answers Accepted]

Enter Parameters

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