Q&A about the site for professional robotic engineers, hobbyists, researchers and students
-- finds Q's with 2 or more answers,
-- where accepted answer is NOT the highest score
-- gives all "other" answers scoring higher than accepted answer
-- ** Last "and" filters out Accepted answers with score over set threshold,
-- so remove to see all cases, or adjust threshold:
-- : higher n includes more answers;
-- : lower n excludes more answers.
-- aScoreThreshold: Set whole number (+/-) value to filter accepted answer score, higher numbers give more results.
-- Thanks PV :)
SELECT DISTINCT TOP 200 Q.Id as [Post Link],
Q.Score as qScore,
A.Score as aScore,
OA.Score as oaScore,
OA.Score - A.Score as scoreDiff
FROM Posts Q, Posts A, Posts OA
WHERE Q.PostTypeId = 1
and Q.CreationDate < '2018-05-12'
and Q.CreationDate > '2018-01-01'
AND Q.AnswerCount > 1
AND A.ParentId = Q.Id
AND OA.ParentId = Q.Id
AND A.Id = Q.AcceptedAnswerId
AND OA.Id <> Q.AcceptedAnswerId
AND A.Score < OA.Score
and A.Score < ##aScoreThreshold##
order by Q.Id asc