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 programmers

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

SELECT
  pwd.Id,
  url = 'site://q/' + CAST(pwd.Id AS varchar),
  pwd.DeletionDate,
  pwd.Score,
  pwd.Tags
FROM PostsWithDeleted pwd

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

Enter Parameters

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