Questions I have answered that contain some text but excluding questions with a tag

0

Please login or register to vote for this query.

(click on this box to dismiss)

For looking for questions you've answered that may need a tag added

Anime and Manga

Q&A for anime and manga fans

-- Questions I have answered that contain some text but excluding questions with a tag
-- For looking for questions you've answered that may need a tag added

DECLARE @user int = ##user:int##
DECLARE @excluded_tag nvarchar(25) = ##excludedtag:string##
DECLARE @text nvarchar(25) = ##text:string##

SELECT
  q.Id As [Post Link],
  a.Score As [Answer Score]
FROM Posts q, Posts a
WHERE q.Tags NOT LIKE '%<' + @excluded_tag + '>%'
  AND (q.Body LIKE '%' + @text + '%' OR q.Title LIKE '%' + @text + '%')
  AND a.ParentId = q.Id
  AND a.OwnerUserId = @user
ORDER BY [Answer Score] DESC

Enter Parameters

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