The top users based on what percent of answers they have given have been accepted. Excludes users with fewer than 20 answers.
Q&A about the site for students, teachers, and linguists wanting to discuss the finer points of the Italian 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 >=20 ORDER BY Percentage DESC