Top user in all tags by score and answer count

0

Please login or register to vote for this query.

(click on this box to dismiss)

Science Fiction and Fantasy

Q&A for science fiction and fantasy enthusiasts

SELECT TOP 50
       t.TagName,
       a.OwnerUserId AS [User Link],
       SUM(a.Score) / 10 AS Score,
       COUNT(a.Score) AS [Count],
       ((SUM(a.Score) / 10) + COUNT(a.Score)) / 2 AS Total
FROM Posts a, 
     Posts q
     INNER JOIN PostTags qt ON q.Id = qt.PostId
     INNER JOIN Tags t ON t.Id = qt.TagId
WHERE a.ParentId = q.Id
      AND a.PostTypeId = 2
      AND a.CommunityOwnedDate IS NULL
      AND a.OwnerUserId IS NOT NULL
GROUP BY a.OwnerUserId, t.TagName
ORDER BY ((SUM(a.Score) / 10) + COUNT(a.Score)) / 2 DESC

Enter Parameters

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