Previous queries haven't taken into consideration all the requirements laid out in http://meta.stackexchange.com/questions/67397/list-of-all-badges-with-full-descriptions#188732.
Q&A about the site for builders and users of networked sensors and control devices in the contexts of smart homes, industry automation, or environmental sensors
DECLARE @user INT = ##UserId:int##
DECLARE @edits INT
LEFT JOIN Posts as Post on PostHistory.PostId=Post.Id
WHERE UserId=@user and Post.OwnerUserId <> @user
AND PostHistoryTypeId in (4)
--AND Post.ClosedDate IS NULL