Accepted answers

0

Please login or register to vote for this query.

(click on this box to dismiss)

Emacs

Q&A for those using, extending or developing Emacs

-- Accepted answers

SELECT PQ.id
-- , PQ.AcceptedAnswerId
, PA.OwnerUserId AS [User Link]
--, PQ.Title AS QuestionId
, PA.Id AS [Post Link]
--, PA.id
-- , PA.PostTypeId
, PA.Score
-- , IsAccepted = CASE PA.id WHEN PQ.AcceptedAnswerId THEN 'yes' ELSE 'no' END
--, PAA.Score AS [Accepted Score]
, PA.Score - PAA.Score AS [Score Difference]
, CASE PAA.Score WHEN 0 THEN PA.Score ELSE PA.Score / PAA.Score END AS [Score Ratio]
FROM posts PQ
INNER JOIN posts PA ON PA.ParentId=PQ.id
INNER JOIN posts PAA ON PAA.Id=PQ.AcceptedAnswerId

WHERE PA.Score > PAA.Score
AND PA.OwnerUserId=39
ORDER BY [Score Difference]

Enter Parameters

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