Q&A about the site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation
SELECT TOP(##num?500##) p.OwnerUserId AS [User Link], p.OwnerDisplayName, SUM(p.Score) AS [Total Score], COUNT(p.Id) AS [Total Posts], SUM(case when p.PostTypeId = 1 then 1 else 0 end) AS [Total Questions], SUM(case when p.PostTypeId = 2 then 1 else 0 end) AS [Total Answers], SUM(case when p.PostTypeId = 1 then p.Score else 0 end) AS [Score Questions], SUM(case when p.PostTypeId = 2 then p.Score else 0 end) AS [Score Answers], ROUND((SUM(case when p.PostTypeId = 2 then 1 else 0 end))*100.0/(COUNT(p.Id)),2) AS [Percentage Answers] FROM Posts p GROUP BY p.OwnerUserId, p.OwnerDisplayName ORDER BY SUM(p.Score) DESC