WITH TotalViewCounts AS ( SELECT OwnerUserID, SUM(ViewCou...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Chess

Q&A for serious players and enthusiasts of chess

WITH TotalViewCounts AS 
(
SELECT OwnerUserID, SUM(ViewCount) as TotalViewCount
FROM Posts
WHERE PostTypeId = 1
GROUP BY OwnerUserID
)

SELECT vc.OwnerUserID, 
       vc.TotalViewCount,
       u.Reputation, 
       u.DisplayName, 
       u.Location 
FROM TotalViewCounts vc
LEFT JOIN
Users u 
ON 
vc.OwnerUserID = u.Id
WHERE TotalViewCount > 0
AND OwnerUserID IS NOT NULL
ORDER BY TotalViewCount DESC

Enter Parameters

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