Users with most Posts, Questions, Answers

0

Please login or register to vote for this query.

(click on this box to dismiss)

MathOverflow Meta

Q&A about the site for professional mathematicians

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 [Posts],
  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,
  SUM(CASE WHEN p.CommunityOwnedDate IS NOT NULL THEN 1 ELSE 0 END) AS [CW Posts]
FROM Posts p
GROUP BY p.OwnerUserId, p.OwnerDisplayName
ORDER BY COUNT(p.Id) DESC

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results