Q&A for professional and enthusiast programmers
-- Enter Query Title -- Enter Query Description SELECT TOP 100 Id AS [User Link], P.C AS [Great Answers], CASE WHEN (SELECT Count(*) FROM Posts WHERE PostTypeId = 2 AND OwnerUserId = U.Id) > 0 THEN P.C / (SELECT TC = Count(*) FROM Posts WHERE PostTypeId = 2 AND OwnerUserId = U.Id) ELSE 0 END AS [Great Answer Ratio] FROM Users U INNER JOIN (SELECT OwnerUserId, C = Count(*) FROM Posts WHERE Score >= 10 GROUP BY OwnerUserId) P ON U.id = P.OwnerUserId ORDER BY [Great Answer Ratio] Desc