Display, in descending order, the ratio of accepted answers for users with at least MinRep. This excludes answers to questions that have no accepted answers.
Q&A about the site for members of the workforce navigating the professional setting
-- Answer acceptance ratio v2 -- Display, in descending order, the ratio of accepted answers for users with at least MinRep. This excludes answers to questions that have no accepted answers. SELECT DisplayName, Answers, Accepted, Accepted*1.0/Answers as Ratio FROM Users INNER JOIN (SELECT x.OwnerUserId, Accepted, Answers FROM (SELECT a.OwnerUserId, COUNT(*) AS Accepted FROM Posts a INNER JOIN Posts q ON q.AcceptedAnswerId = a.Id GROUP BY a.OwnerUserId ) x INNER JOIN (SELECT a.OwnerUserId, COUNT(*) AS Answers FROM Posts a INNER JOIN Posts q ON a.ParentId = q.Id WHERE a.PostTypeId = 2 AND q.AcceptedAnswerId IS NOT NULL GROUP BY a.OwnerUserId ) y ON x.OwnerUserId = y.OwnerUserId ) z ON OwnerUserId = Id WHERE Reputation > ##MinRep## ORDER BY Ratio DESC -- Enter Query Description