Top editors in a given period

0

Please login or register to vote for this query.

(click on this box to dismiss)

Personal Finance and Money

Q&A for people who want to be financially literate

SELECT TOP (##num?100##)
  ph.UserId AS [User Link],
  COUNT(DISTINCT RevisionGUID) AS [Count] 
--Count(Id) would count several times if body/tags/title are edited in the same edit
FROM
  PostHistory ph
INNER JOIN 
  Posts p ON p.id = ph.postid
WHERE
  ph.PostHistoryTypeId IN (4, 5, 6) -- edit title/body/tags
  AND (ph.CreationDate >= '##Date1?2018-01-01##') AND (ph.CreationDate <= '##Date2?2018-12-31##')
  AND ph.userid <> p.owneruserid
  AND (p.communityowneddate is null or (ph.creationdate < p.communityowneddate))
GROUP BY
  ph.UserId
ORDER BY
  [Count] DESC

Enter Parameters

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