Users with most edits per day


Please login or register to vote for this query.

(click on this box to dismiss)

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

;  with editors_cte as
  h.UserId AS uid,
  COUNT(DISTINCT h.RevisionGUID) AS EditCount,
  DATEDIFF(day, u.CreationDate, CAST(GETDATE() AS Date)) AS Days
FROM PostHistory h JOIN Posts p ON h.PostId=p.Id
  JOIN Users u ON u.Id=h.UserId
WHERE (p.PostTypeId in (1,2))
---only questions and answers
  AND (h.PostHistoryTypeId in (1,2,3,4,5,6,7,8,9))
---only edit and rollbacks  
GROUP BY h.UserId, u.CreationDate

SELECT TOP(##num?100##)
  uid AS [User Link],
  ROUND(EditCount/(CAST(Days AS decimal)),2) AS [Edits Per Day], 
  EditCount, Days
FROM editors_cte
GROUP BY uid, EditCount, Days
ORDER BY (ROUND(EditCount/(CAST(Days AS decimal)),2)) DESC

Enter Parameters

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