declare @tagId int set @tagId = (select Id from Tags wher...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Statistical Analysis

Q&A for people interested in statistics, machine learning, data analysis, data mining, and data visualization

declare @tagId int
set @tagId = (select Id from Tags where TagName = '##TagName##')

select Id as [Post Link], * from Posts postsQ
where
 PostTypeId = 1 and
 not (UPPER(Body) like ('%' + UPPER('##Keyword##') + '%')) and
 not (UPPER(Title) like ('%' + UPPER('##Keyword##') + '%')) and
 (select count(*) from PostTags where
  PostId = Id and TagId = @tagId) = 0 and
 (select count(*) from Posts postsA where
  postsA.ParentId = postsQ.Id and
  UPPER(Body) like ('%' + UPPER('##Keyword##') + '%')) > 0

Enter Parameters

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