Q&A about the site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation
-- 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
INNER JOIN Posts a on a.ParentId = p.Id
-- p.LastEditDate < DATEADD(month, -6, p.LastActivityDate) AND
p.Title = 'Site statistics' AND
(p.OwnerUserId = @UserId OR a.OwnerUserId = @UserId)