Q&A for gamemasters and players of tabletop, paper-and-pencil role-playing games
-- Total number of answers accepted SELECT u.Displayname AS Name, COUNT(*) AS AccAns, a.OwnerUserId FROM Posts AS a JOIN Users AS u ON a.OwnerUserId = u.Id JOIN ( SELECT COUNT(*) AS TotalAns, t.OwnerUserId FROM Posts AS t WHERE PostTypeID = 2 GROUP BY t.OwnerUserId ) AS t2 ON t2.OwnerUserId=a.OwnerUserId WHERE a.Id IN (SELECT AcceptedAnswerId FROM Posts) GROUP BY a.OwnerUserID, u.Displayname ORDER BY AccAns DESC -- How to add in total number of Answers?