ES.PPub

0

Please login or register to vote for this query.

(click on this box to dismiss)

PPub Query; 10k+ Unanswered Questions vs. Answered.

Open Data

Q&A for developers and researchers interested in open data

DECLARE @QCount int = 10000

SELECT
  *
FROM
  (
    SELECT
      t.TagName AS TagName,
      COUNT(1) AS UnansweredCount,
      t.Count AS QuestionCount
      FROM Posts q
      INNER JOIN PostTags pt ON q.Id = pt.PostId
      INNER JOIN Tags t ON pt.TagId = t.Id
      WHERE
        (q.PostTypeId = 1) AND
        (q.ClosedDate IS NULL) AND
        NOT EXISTS
        (
          SELECT *
            FROM Posts a
            WHERE
              (a.ParentId = q.Id) AND
              ((a.Score > 0) OR (a.Id = q.AcceptedAnswerId))
        )
      GROUP BY TagName, t.Count
  ) a
WHERE a.QuestionCount > @QCount
ORDER BY
    UnansweredCount

Enter Parameters

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