Users with Top Answer Effectiveness (accepted percentage times quantity)

3

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 multiplied by their total number of answers, within the group of users with more than Y answers in total. Looks only at open, non-CW questions and answers. See also "Users with Top Accepted Answer Percentage" (http://data.stackexchange.com/stackoverflow/s/2114/users-with-top-accepted-answer-percentage)

Economics

Q&A for those who study, teach, research and apply economics and econometrics

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

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],
        CAST(Sum(CASE q.AcceptedAnswerId WHEN a.Id THEN 1 ELSE 0 END) AS FLOAT) * (CAST(Sum(CASE q.AcceptedAnswerId WHEN a.Id THEN 1 ELSE 0 END) AS FLOAT) / Count(a.Id)) AS Weighting
FROM    Posts AS a
   JOIN Posts AS q
     ON a.ParentId = q.Id
WHERE
        q.postTypeId = 1
    AND a.postTypeId = 2
GROUP BY
        a.OwnerUserId
HAVING
        Count(a.Id) > ##MinimumAnswersPerUser##
ORDER BY
        Weighting DESC

Enter Parameters

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