Are answers ever closed (no you have to search for related questions first)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Audio-Video Production Meta

Q&A about the site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation

-- answers with a question with a closed date
SELECT COUNT(*) as [Answers with a closed question]
FROM Posts a
INNER JOIN
(SELECT *
 FROM Posts q
 WHERE q.PostTypeId = 1 -- questions
  and q.ClosedDate is not null
 ) q
ON q.Id = a.ParentId
WHERE a.PostTypeId = 2 -- answers

-- answers with a question without closed date
SELECT COUNT(*) as [Answers with an open question]
FROM Posts a
INNER JOIN
(SELECT *
 FROM Posts q
 WHERE q.PostTypeId = 1 -- questions
  and q.ClosedDate is null
 ) q
ON q.Id = a.ParentId
WHERE a.PostTypeId = 2 -- answers

Enter Parameters

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