Question which had the tag but no longer have it (including the editor)

1

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS Meta

Q&A for administrators, end users, developers and designers for Craft CMS

with firstrev_cte AS
(
SELECT MIN(ph.Id) AS MinId, p.Id 
FROM Posts p JOIN PostHistory ph ON ph.PostId=p.Id
WHERE ph.Text LIKE '%<##tagName##>%' AND NOT (p.Tags LIKE '%<##tagName##>%')
GROUP BY p.Id
)

SELECT PostId AS [Post Link],
  url = 'site://posts/' + CAST(PostId AS varchar)+'/revisions',
  UserId AS [User Link], UserDisplayName, CreationDate
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