Find answers with more score than the accepted answer (order by diff)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Science Fiction and Fantasy Meta

Q&A about the site for science fiction and fantasy enthusiasts

SELECT Top(1000)
  question.Id AS [Post Link],
  answer.Score AS "Score",
  acceptedAnswer.Score AS "Score Accepted"
FROM Posts answer
  JOIN Posts question ON question.Id = answer.ParentId
  JOIN Posts acceptedAnswer ON acceptedAnswer.Id = question.AcceptedAnswerId
WHERE question.AcceptedAnswerId IS NOT NULL
AND answer.PostTypeId = 2
AND answer.Id <> acceptedAnswer.Id
AND answer.Score > acceptedAnswer.Score
ORDER BY answer.Score - acceptedAnswer.Score DESC

Enter Parameters

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