Questions that are closed, excluding duplicates

0

Please login or register to vote for this query.

(click on this box to dismiss)

Questions that are likely to need some delete votes. Duplicates should be left alone for the most part, so these are right out.

Physics

Q&A for active researchers, academics and students of physics

SELECT p.Score,
       p.Id                                                                AS [Post Link],
       COALESCE(p.AnswerCount, 0)                                          AS [Answer Count],
       CASE h.Comment
         WHEN '1' THEN 'duplicate'
         WHEN '2'  THEN 'off topic'
         WHEN '3'  THEN 'not constructive'
         WHEN '4'  THEN 'not a real question'
         WHEN '7'  THEN 'too localized'
         WHEN '10' THEN 'general reference'
         WHEN '20' THEN 'noise'
       END                                                                 AS [Close Reason],
       CASE WHEN p.CommunityOwnedDate IS NOT NULL THEN 'Yes' ELSE NULL END AS Wiki,
       CASE WHEN h.UserId != -1                   THEN 'Yes' ELSE NULL END AS [Mod Closed],
       p.OwnerUserId                                                       AS [User Link]
FROM   Posts p
       INNER JOIN PostHistory h
         ON h.PostId = p.Id                   -- events pertaining to the question
            AND h.CreationDate = p.ClosedDate -- that occurred when it was closed
WHERE  p.PostTypeId = 1             -- questions
       AND p.ClosedDate IS NOT NULL -- that were closed
       AND h.PostHistoryTypeId = 10 -- and have a history entry for it
       AND h.Comment != 1           -- that says it's not a dupe
ORDER  BY p.Score ASC

Enter Parameters

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