Abandoned placeholder questions that probably should be closed and/or deleted

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Apps

Q&A for apps, scripts, and development with the Stack Exchange API

-- MaxScore: Show listings with scores <= this value
-- MinAge: Must have last been active ths many Months ago
DECLARE @MaxDate DATE = DATEADD (month, -##MinAge:INT?24##, GETDATE() );

WITH postAnonFeedback AS (
    SELECT
                q.Id
                , SUM (CASE WHEN pf.VoteTypeId = 2 THEN 1 ELSE 0 END)   AS Helpful
                , SUM (CASE WHEN pf.VoteTypeId = 3 THEN 1 ELSE 0 END)   AS Unhelpful
    FROM        Posts           q
    INNER JOIN  PostTags        pt      ON q.Id = pt.PostId
    INNER JOIN  Tags            t       ON t.Id = pt.TagId
    LEFT JOIN   PostFeedback    pf      ON q.Id = pf.PostId
    WHERE       q.PostTypeId    = 1  -- Questions
    AND         t.TagName       = 'placeholder'
    GROUP BY    q.Id
)
SELECT
            q.Id                    AS [Post Link]
            , q.Score
            , paf.Unhelpful         AS [Anon Bad]
            , paf.Helpful           AS [Anon Useful]
            , q.CreationDate
            , q.LastActivityDate    AS [Last Active]
            , q.Tags
FROM        Posts               q
INNER JOIN  postAnonFeedback    paf     ON q.Id = paf.Id
WHERE       q.Score             <= ##MaxScore:INT?1##
AND         q.LastActivityDate  <= @MaxDate
ORDER BY    q.Score
            , paf.Unhelpful DESC
            , paf.Helpful
            , q.LastActivityDate
            , q.Title

Enter Parameters

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