Find comments that might be no longer needed

0

Please login or register to vote for this query.

(click on this box to dismiss)

Music Fans Meta

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

SELECT 
  p.id as [Post Link]
FROM Posts p
  JOIN Comments c ON c.PostId = p.Id
  JOIN PostHistory ph on ph.PostId = p.Id 
WHERE DATEDIFF(day, p.LastEditDate, c.CreationDate) >= 0
  AND c.Text LIKE '%##KeywordsInComment##%'
  AND ph.PostHistoryTypeId <> 10 -- not closed
GROUP BY p.Id

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results