Find answers with more score than the accepted answer

0

Please login or register to vote for this query.

(click on this box to dismiss)

Engineering

Q&A for professionals and students of engineering

SELECT 
  answer.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.OwnerUserId = ##UserId:int##
AND answer.Id <> acceptedAnswer.Id
AND answer.Score > acceptedAnswer.Score
ORDER BY answer.Score DESC

Enter Parameters

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