Q&A about the site for members of the workforce navigating the professional setting
SELECT TOP(##num?500##) RANK() OVER(ORDER BY Count(p.Id) DESC) AS [Rank], p.OwnerUserId AS [User Link], p.OwnerDisplayName, Count(p.Id) AS [Count], SUM(case when p.PostTypeId = 1 then 1 else 0 end) AS QCount, SUM(case when p.PostTypeId = 2 then 1 else 0 end) AS ACount FROM Posts p GROUP BY p.OwnerUserId, p.OwnerDisplayName ORDER BY Count(p.Id) DESC