Tag-based Zombie sniffer rolfl

0

Please login or register to vote for this query.

(click on this box to dismiss)

A CR Zombie finder that takes a tag name to find zombies.

Code Review

Q&A for peer programmer code reviews

WITH BestAnswer as (
  select ParentId, Max(Score) as Score
  from Posts
  where PostTypeId = 2
  group by ParentId
)

SELECT 
  q.Id AS [Post Link],
  q.Tags
FROM 
  Posts q
    INNER JOIN PostTags pt
    ON    q.Id = pt.PostId
    INNER JOIN Tags t
    ON    pt.TagId = t.id
      AND t.TagName = '##TagName##'
    INNER JOIN BestAnswer a
    ON    q.Id = a.ParentId
      AND a.Score >= ##MinScore:int?0##
      AND a.Score <= ##MaxScore:int?0##
WHERE 
      q.PostTypeId = 1
  AND q.AnswerCount > 0
  AND q.AcceptedAnswerId IS NULL
  
-- TagName: Tag name as you would use in your post
-- MinScore: Highest answer has at least votes:
-- MaxScore: Highest answer has at most votes:

Enter Parameters

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