Q&A for users, experts, and developers of the Tezos blockchain project
SELECT TOP(##num?500##) u.Id AS [User Link], COUNT(p.Id) AS [Count], SUM(case when p.PostTypeId = 1 then 1 else 0 end) AS [Questions], SUM(case when p.PostTypeId = 2 then 1 else 0 end) AS [Answers] FROM Users u INNER JOIN Posts p ON p.OwnerUserId=u.Id GROUP BY u.Id ORDER BY COUNT(p.Id) DESC