Questions hidden having ultra specific tags but not the main tag

0

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS

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

declare @question int = 1;
declare @reTag int = 3;
declare @tagToSearch nvarchar(35) = ##ultratag:string?google-apps-script-web-application##;
declare @mainTag nvarchar(35) = ##maintag:string?google-apps-script##;

select
cast(Posts.CreationDate as date),
Posts.Tags,
Posts.Id as [Post Link]
from
Posts
where
Posts.PostTypeId = @question
and
Posts.Tags like ('%<' + @tagToSearch + '>%' )

and 
Posts.Tags not like ('%<'+@mainTag+'>%' )
group by
Posts.Tags,Posts.Id, cast(Posts.CreationDate as date)
order by
cast(Posts.CreationDate as date) desc

Enter Parameters

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