Top 50 Most Prolific Editors (proper)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Shows the top 50 post editors, where the user was the most recent editor (meaning the results are conservative compared to the actual number of edits).

Stack Overflow

Q&A for professional and enthusiast programmers

-- Top 50 Most Prolific Editors
-- Shows the top 50 post editors, where the user edited a post by someone eles
-- and was the most recent editor
-- (meaning the results are conservative compared to the actual number of edits).

SELECT *
      ,rank() OVER (ORDER BY TotalEdits DESC) AS rnk
FROM (
  SELECT TOP 100
         LastEditorUserId AS [User Link]
  
        ,COUNT(*) AS TotalEdits
        ,COUNT(CASE WHEN PostTypeId = 1 THEN 1 ELSE NULL END) AS QuestionEdits
        ,COUNT(CASE WHEN PostTypeId = 2 THEN 1 ELSE NULL END) AS AnswerEdits
  FROM   Posts
  WHERE  LastEditorUserId <> OwnerUserId
  -- AND    LastEditorUserId = 939860
  GROUP  BY LastEditorUserId
  ORDER  BY TotalEdits DESC
  ) AS x

Enter Parameters

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