Users with Top Accepted Answer Percentage

1

Please login or register to vote for this query.

(click on this box to dismiss)

Displays the top X users according to their accepted answer percentage, within the group of users with more than Y answers in total. Looks only within open, non-CW questions and answers. See also "Users with Top Answer Effectiveness" (http://data.stackexchange.com/stackoverflow/s/2113/users-with-top-answer-effectiveness-accepted-percentage-times-quantity)

Open Source Meta

Q&A about the site for people organizing, marketing or licensing open source development projects

-- Top Accepted Answer Percentage
-- Displays the top X users according to their accepted answer percentage,
-- within the group of users with more than Y answers in total.
-- Looks only within open, non-CW questions and answers.
SELECT  TOP ##MaxUsers##
        a.OwnerUserId AS [User Link],
        Count(a.Id) AS [Total Answers],
        Sum(CASE q.AcceptedAnswerId WHEN a.Id THEN 1 ELSE 0 END) AS [Accepted Answers],  
        Round(Sum(CASE q.AcceptedAnswerId WHEN a.Id THEN 1 ELSE 0 END) * 100.0 / Count(a.Id), 1) AS [Percentage Accepted]
FROM    Posts AS a
JOIN    Posts AS q
     ON a.ParentId = q.Id
WHERE
        q.PostTypeId = 1
--    AND q.ClosedDate IS NULL
--    AND q.CommunityOwnedDate IS NULL
    AND a.PostTypeId = 2
--    AND a.ClosedDate IS NULL
--    AND a.CommunityOwnedDate IS NULL
GROUP BY
        a.OwnerUserId
HAVING
        Count(a.Id) > ##MinimumAnswersPerUser##
ORDER BY
        [Percentage Accepted] DESC

Enter Parameters

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