Most Accepted Users

3

Please login or register to vote for this query.

(click on this box to dismiss)

Users whose answers are accepted most frequently.

History of Science and Math

Q&A for people interested in the history and origins of science and mathematics

-- Most Accepted Users
-- Users whose answers are accepted most frequently.

SELECT TOP 100
    Id AS [User Link],
    TotalAnswers,
    AcceptedAnswers,
    ROUND(100 * AcceptedAnswers / (TotalAnswers * 1.0), 2) AS AcceptedPct
    FROM
    (
        SELECT
            Id,
            (
                 SELECT COUNT(*)
                     FROM Posts
                     WHERE (OwnerUserId = u.Id) AND (PostTypeId = 2)
            ) AS TotalAnswers,
            (
                SELECT COUNT(*)
                    FROM Posts q
                    INNER JOIN Posts a ON q.AcceptedAnswerId = a.Id
                    WHERE (a.OwnerUserId = u.Id) AND (a.PostTypeId = 2)
            ) AS AcceptedAnswers
            FROM Users u
            WHERE u.Reputation > 15
    ) t
    WHERE
        (t.TotalAnswers > ##MinimumAnswers##) AND
        (t.AcceptedAnswers > 0)
    ORDER BY
        AcceptedPct DESC,
        TotalAnswers DESC

Enter Parameters

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