Questions with clarifying questions

0

Please login or register to vote for this query.

(click on this box to dismiss)

Anime and Manga

Q&A for anime and manga fans

SELECT TOP 100 Question.Id AS [Post Link],
               Question.Score,
               Question.ViewCount
FROM   Posts as Question
       INNER JOIN Comments AS ClarifyingQuestion
               ON ClarifyingQuestion.PostId = Question.Id
       INNER JOIN Comments AS ClarifyingAnswer
               ON ClarifyingAnswer.PostId = Question.Id
       INNER JOIN Posts AS AcceptedAnswer
               ON Question.AcceptedAnswerId = AcceptedAnswer.Id
WHERE  Question.PostTypeId = 1                                             -- Is Question
       AND ClarifyingQuestion.Text LIKE '%?'                               -- ClarifyingQuestion is a question
       AND ClarifyingQuestion.UserId = AcceptedAnswer.OwnerUserId          -- Accepted answer is from ClarifyingQuestioner
       AND ClarifyingAnswer.UserId = Question.OwnerUserId                  -- Post author answers clarifying question
       AND ClarifyingAnswer.CreationDate > ClarifyingQuestion.CreationDate -- ClarifyingAnswer comes after ClarifyingQuestion
GROUP  BY Question.Id, 
          Question.Score, 
          Question.ViewCount 
ORDER  BY ViewCount ASC

Enter Parameters

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