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.
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 ;