Users with highest total number of views of their questions

1

Please login or register to vote for this query.

(click on this box to dismiss)

The Great Outdoors

Q&A for people who love being outdoors enjoying nature and wilderness, and learning about the required skills and equipment

SELECT TOP(##num?500##)
  RANK() OVER (ORDER BY SUM(p.ViewCount) DESC) AS [Rank],
  p.OwnerUserId AS [User Link], p.OwnerDisplayName,
  SUM(p.ViewCount) AS [Total Views],
  SUM(Case When p.CommunityOwnedDate IS NULL Then p.ViewCount Else 0 End) AS [NonCW Views],
  COUNT(p.Id) AS [Count],
  SUM(Case When p.CommunityOwnedDate IS NULL Then 1 Else 0 End) AS [NonCW Count]
FROM Posts p
WHERE p.PostTypeId=1
GROUP BY p.OwnerUserId, p.OwnerDisplayName
ORDER BY SUM(p.ViewCount) DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results