Questions by [tag] that are also [not] tagged with a [tag]

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

declare @tag1 nvarchar(35) = '%<' + ##Tag1:string## + '>$';
declare @tag2 nvarchar(35) = '%<' + ##Tag2:string## + '>$';
declare @include bit = iif(##include:string?yes## = 'yes', 1, 0);

select
  Tags,
  Id as [Post Link]
from
  Posts
where
  DeletionDate is null and
  Score >= 0 and
  Tags like @tag1 and
  (
    @include = 1 and Tags like @tag2
    or
    @include = 0 and Tags not like @tag2
  )

Enter Parameters

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