Answers to investigate

0

Please login or register to vote for this query.

(click on this box to dismiss)

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".

Music Fans Meta

Q&A about the site for music historians, critics, and fans

declare @startDate datetime = ##startDate##;
declare @endDate datetime = ##endDate##;

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.CreationDate <= @endDate
and a.CreationDate >= @startDate
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 (Upper(c.text) LIKE Upper('%race%')
     or Upper(c.text) LIKE Upper('%security%')
     or Upper(c.text) LIKE Upper('%vulnerability%'))
;

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results