Q&A for people looking to bypass life's everyday problems with simple tricks
--select * from posthistory where postid=284518 SELECT p1.id, p1.body, (SELECT TOP 1 p.Body FROM Posts p WHERE p.PostTypeId = 2 -- 2 indica que é uma resposta AND p.ParentId = p1.Id -- ID do post específico ORDER BY p.Score DESC) AS AnswerBody FROM Posts p1 WHERE p1.Tags LIKE '%database%' AND p1.Tags LIKE '%artificial-intelligence%'; /*SELECT top 1 p.Body AS AnswerBody, FROM Posts p WHERE p.PostTypeId = 2 -- 2 indica que é uma resposta AND p.ParentId = p1.Id -- ID do post específico ORDER BY p.Score DESC*\