Posts from which an initial tag was removed

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT
  p.Id AS [Post Link],
  Replace(SubString(i.Text, 2, Len(i.Text)-2), '><', ' ') AS [Initial tags],
  Replace(SubString(p.Tags, 2, Len(p.Tags)-2), '><', ' ') AS [Current tags]
FROM Posts p
INNER JOIN PostHistory i ON p.Id = i.PostId
WHERE i.PostHistoryTypeId = 3 -- Initial Tags
  AND i.Text LIKE '%<' + '##Tag##' + '>%'
  AND p.Tags NOT LIKE '%<' + '##Tag##' + '>%'
ORDER BY p.Id ASC

Enter Parameters

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