http://meta.stackoverflow.com/questions/284152/search-without-comments
Q&A for professional and enthusiast programmers
declare @tagToSearch nvarchar(35) = ##tag:string?all## declare @withAnswers bit = iif(##answers:string?yes## = 'yes', 1, 0) declare @offset int = ##offset:int?6## declare @posted tinyint = iif(##posted:string?yes## = 'yes', 1, 0) select Id as [Post Link], Score, AnswerCount from Posts where CreationDate >= iif( @posted = 1, dateadd(##period?month##, -@offset, getdate()), CreationDate ) and CommentCount = 0 and ClosedDate is null and DeletionDate is null and AnswerCount = iif(@withAnswers = 0, 0, AnswerCount) and Tags = iif(@tagToSearch != 'all', '<' + @tagToSearch + '>', Tags) order by Score desc