Deleted questions by tags

0

Please login or register to vote for this query.

(click on this box to dismiss)

Search recently deleted questions in specific tags.

Stack Overflow

Q&A for professional and enthusiast programmers

DECLARE @tag1 AS NVARCHAR(60) = ##Tag1:string? ##;
DECLARE @tag2 AS NVARCHAR(60) = ##Tag2:string? ##;
DECLARE @tag3 AS NVARCHAR(60) = ##Tag3:string? ##;

SELECT TOP ##number##
  Id,
  url = 'site://q/' + CAST(Id AS varchar),
  DeletionDate, Score, Body, Tags
FROM PostsWithDeleted

WHERE (PostTypeId = 1) and (DeletionDate IS NOT NULL)
AND (@tag1 = '' OR LOWER(Tags) LIKE '%<' + LOWER(RTRIM(LTRIM(@tag1))) + '>%')
AND (@tag2 = '' OR LOWER(Tags) LIKE '%<' + LOWER(RTRIM(LTRIM(@tag2))) + '>%')
AND (@tag3 = '' OR LOWER(Tags) LIKE '%<' + LOWER(RTRIM(LTRIM(@tag3))) + '>%')
ORDER BY DeletionDate DESC

Enter Parameters

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