Q&A for professional and enthusiast programmers
with answerers as ( select count(*) answers, a.OwnerUserId UserId from Posts q join Posts a on a.Id = q.AcceptedAnswerId where a.Score > 0 and q.Score > 0 and q.ClosedDate is null group by a.OwnerUserId ) /*select count(*) --answers, UserId as [User Link] from answerers --order by answers desc*/ select answers, count(*) N--, count(*)*answers from answerers group by answers order by answers