Top 100 Users by answer accepted rate

0

Please login or register to vote for this query.

(click on this box to dismiss)

The top users based on what percent of answers they have given have been accepted. Excludes users with fewer than 20 answers.

Spanish Language

Q&A for linguists, teachers, students and Spanish language enthusiasts in general wanting to discuss the finer points of the language

-- Top 100 Users by answer accepted rate
-- The top users based on what percent of answers they have given have been accepted.
-- Excludes users with fewer than 20 answers.

WITH
UserAnswers AS
(
 SELECT U.Id,
        U.Reputation,
        COUNT( DISTINCT A.Id ) AS AnswerCount,
        COUNT( Q.Id ) AS AcceptedCount
 FROM Users U
 JOIN Posts A ON A.OwnerUserId = U.Id AND A.PostTypeId = 2
 LEFT OUTER JOIN Posts Q ON Q.AcceptedAnswerId = A.Id
 GROUP BY U.Id,
          U.Reputation
)

SELECT TOP 100
 U.Id AS [User Link],
 U.Reputation,
 U.AnswerCount,
 U.AcceptedCount,
 ROUND((CAST(U.AcceptedCount AS FLOAT) / U.AnswerCount)*100,3) AS Percentage 

FROM
 UserAnswers U

WHERE U.AnswerCount >=100

ORDER BY
 Percentage DESC

Enter Parameters

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