Find answers that are either accepted or top-voted and that have at least one comment with at least one of the following words: "security", "vulnerability", "race".
Q&A about the site for music historians, critics, and fans
declare @firstId int = ##firstId##; declare @lastId int = ##lastId##; select a.Id as [Post Link], c.text as [Reason] from Posts q inner join Posts a on (a.ParentId = q.Id) inner join Comments c on (c.PostId = a.Id) where a.id >= @firstId and a.id <= @lastId and ((a.Id = q.AcceptedAnswerId) or (a.Score = ( SELECT TOP 1 Score FROM Posts otherA WHERE otherA.ParentId = q.Id ORDER BY Score DESC)) ) and (c.text like '%sup%') -- and ((c.text LIKE '%race%' -- or (c.text LIKE '%security%') -- or (c.text LIKE '%vulnerability%')) ;