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)

Mathematica Meta

Q&A about the site for users of Wolfram Mathematica

SELECT 
Posts.OwnerUserId AS [User Link],
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
WHERE Users.Reputation > 25000
  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 Posts.OwnerUserId

Enter Parameters

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