Questions which no longer have given two tags (including the editor)

1

Please login or register to vote for this query.

(click on this box to dismiss)

Mathematics

Q&A for people studying math at any level and professionals in related fields

;  with revisions_cte as
(
SELECT
DISTINCT p.Id AS pid, ph1.Id AS phId
FROM PostHistory ph1 INNER JOIN Posts p ON ph1.PostId=p.Id
WHERE ph1.PostHistoryTypeId in (3,6,9)
  and ph1.Text Like '%<##tag1?convergence-divergence##>%'
  and ph1.Text Like '%<##tag2?integration##>%'
  and NOT((p.Tags Like '%<##tag1##>%') AND (p.Tags Like '%<##tag2##>%'))
), firstrev_cte AS
(SELECT
  pid, MIN(ph2.Id) as MinId
FROM revisions_cte INNER JOIN PostHistory ph2 ON ph2.PostId=pid
  WHERE (ph2.Id>phId)
   AND ph2.PostHistoryTypeId in (3,6,9)
   AND NOT((ph2.Text Like '%<##tag1##>%') AND (ph2.Text Like '%<##tag2##>%'))
GROUP BY pid
)

SELECT PostId AS [Post Link],
  url = 'site://posts/' + CAST(PostId AS varchar)+'/revisions',
  UserId AS [User Link], UserDisplayName, CreationDate, Comment
FROM PostHistory INNER JOIN firstrev_cte ON PostHistory.Id=MinId
ORDER BY CreationDate DESC

Enter Parameters

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