Q&A for professional and enthusiast programmers
select Comments.Id as [Comment Link], UserId as [User Link] from Comments join Posts on Posts.Id=Comments.PostId where text like '%invalid%' and PostTypeId=2 and Posts.LastEditDate < Comments.CreationDate and (select ClosedDate from Posts q where q.Id = Posts.ParentId) is null and not exists (select 1 from Comments reply where reply.CreationDate > Comments.CreationDate and reply.PostId = Comments.PostId) order by Comments.CreationDate desc; select Comments.Id as [Comment Link], UserId as [User Link] from Comments join Posts on Posts.Id=Comments.PostId where text like '%delet%' and PostTypeId=2 and Posts.LastEditDate < Comments.CreationDate and (select ClosedDate from Posts q where q.Id = Posts.ParentId) is null order by Comments.CreationDate desc; select Comments.Id as [Comment Link], UserId as [User Link] from Comments join Posts on Posts.Id=Comments.PostId where text like '%wrong%' and PostTypeId=2 and Posts.LastEditDate < Comments.CreationDate and (select ClosedDate from Posts q where q.Id = Posts.ParentId) is null order by Comments.CreationDate desc; select Comments.Id as [Comment Link], UserId as [User Link] from Comments join Posts on Posts.Id=Comments.PostId where text like '%incorrect%' and PostTypeId=2 and Posts.LastEditDate < Comments.CreationDate and (select ClosedDate from Posts q where q.Id = Posts.ParentId) is null order by Comments.CreationDate desc; select Comments.Id as [Comment Link], UserId as [User Link] from Comments join Posts on Posts.Id=Comments.PostId where text like '%fail%' and PostTypeId=2 and Posts.LastEditDate < Comments.CreationDate and (select ClosedDate from Posts q where q.Id = Posts.ParentId) is null order by Comments.CreationDate desc;