In which tag users earned most reputation from answering on duplicate questions?

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mythology Meta

Q&A about the site for enthusiasts and scholars of mythology and folklore

-- In which tag users earned most reputation from answering on duplicate questions?

SELECT Tags.TagName,
       SUM(CASE
               WHEN Votes.VoteTypeId = 2 THEN 10
               ELSE -2
           END) AS ScoreFromDuplicates
FROM Posts
INNER JOIN Users ON Users.Id = Posts.OwnerUserId
INNER JOIN Votes ON Votes.PostId = Posts.Id
INNER JOIN PostTags ON PostTags.PostId = Posts.ParentId
INNER JOIN Tags ON Tags.Id = PostTags.TagId
WHERE Users.Reputation > 1000
  AND Posts.CreationDate >= DATEADD(DAY, -30, GETDATE())
  AND Posts.CreationDate <= GETDATE()
  AND Votes.VoteTypeId IN (2,
                           3)
  AND Posts.ParentID IN
    (SELECT Posts.Id
     FROM Posts
     INNER JOIN PostHistory ON PostHistory.PostId = Posts.Id
     WHERE Posts.CreationDate >= DATEADD(DAY, -30, GETDATE())
       AND Posts.CreationDate <= GETDATE()
       AND TRY_CONVERT(int, PostHistory.Comment) IN (1,
                                                     101)
       AND PostHistory.PostHistoryTypeId = 10)
GROUP BY Tags.TagName
HAVING SUM(CASE
               WHEN Votes.VoteTypeId = 2 THEN 10
               ELSE -2
           END) > 8
ORDER BY ScoreFromDuplicates DESC

Enter Parameters

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