Q&A for community managers, administrators, and moderators
-- How close are you to getting the Archaeologist badge? -- "Edited 100 posts that were inactive for 6 months" DECLARE @UserId INT = ##UserId##; SELECT COUNT(*) FROM Posts p WHERE p.OwnerUserId != @UserId -- Not my post originally AND p.LastEditorUserId = @UserId -- But I edited it AND p.LastActivityDate < DATEADD(month, -6, p.LastEditDate) -- more than 6 months after it was last edited.