Deleted questions in a given tag which had at least one answer

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT TOP ##number##
  q.Id, 
  url = 'site://q/' + CAST(q.Id AS varchar),
  COUNT(*) AS NumAnswers, q.Score
FROM PostsWithDeleted q
INNER JOIN PostsWithDeleted a ON a.ParentId = q.Id
WHERE (q.Tags LIKE '%<##Tagname##>%') and
  (q.Deletiondate IS NOT NULL) and (q.PostTypeId =1) and (a.PostTypeId=2) 
GROUP BY q.Id, q.Score
ORDER BY NumAnswers DESC

Enter Parameters

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