Q&A for professional and enthusiast programmers
SELECT TOP 100 OwnerUserId AS [User Link], SUM(CASE WHEN PostTypeId = 1 THEN 1 ELSE 0 END) AS QuestionCount, SUM(CASE WHEN PostTypeId = 2 THEN 1 ELSE 0 END) AS AnswerCount, SUM(CASE WHEN PostTypeId <= 2 THEN 1 ELSE 0 END) AS TotalCount FROM Posts GROUP BY OwnerUserId ORDER BY QuestionCount DESC