How many edits until Copy Editor?

3

Please login or register to vote for this query.

(click on this box to dismiss)

Shows a user's total edits so far, how many edits until the "Strunk and White" badge, and how many edits until the "Copy Editor" badge.

SharePoint

Q&A for SharePoint enthusiasts

-- How many edits until Copy Editor?
-- Shows a user's total edits so far.

DECLARE @USER int =  ##UserId##;

SELECT
   COUNT(0) AS 'Number of Edits',
   100 - COUNT(0) AS 'Edits until "Strunk and White"',
   600 - COUNT(0) AS 'Edits until "Copy Editor"'
FROM
   PostHistory
WHERE
   UserId = @User AND
   PostHistoryTypeId >= 4 AND
   PostHistoryTypeId <= 6 AND
   (SELECT OwnerUserId FROM Posts WHERE Id = PostId) <> @User
;

Enter Parameters

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