find candidates for Revival badge with a certain tag

0

Please login or register to vote for this query.

(click on this box to dismiss)

find questions older than 60 days which have no answers of score >= 2

Martial Arts Meta

Q&A about the site for students and teachers of all martial arts

DECLARE @tag VARCHAR(30) = ##tag:string##

SELECT TOP 1000
    Id AS [Post Link],
    Score,
    ViewCount as Views,
    AnswerCount as Answers,
    Body,
    CreationDate
FROM Posts
WHERE
    AcceptedAnswerId IS NULL
    AND PostTypeId = 1
    AND CreationDate < GETDATE() - 60
    AND ClosedDate IS NULL
    AND Tags LIKE '%<' + LOWER(@tag) + '>%'
    AND NOT EXISTS
    (
        SELECT *
        FROM Posts p
        WHERE p.ParentId = Posts.Id
        AND p.Score >= 2
        AND p.PostTypeId = 2
    )

Enter Parameters

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