Outscored accepted answers

0

Please login or register to vote for this query.

(click on this box to dismiss)

Show questions whose accepted answer is not the highest-scored one.

Ask Ubuntu

Q&A for Ubuntu users and developers

SELECT
  q.Id As [Post Link],
  Max(a.Score) AS [Acc. score],
  Max(b.Score) AS [Top. score],
  Count(*) AS [# outscoring],
  Max(DateDiff(day, a.CreationDate, b.CreationDate)) AS [Days to first outscorer]
  --Max(a.CreationDate) AS [Accepted answer date],
  --Max(b.CreationDate) AS [Top answer date]
FROM Posts q, Posts a, Posts b
WHERE q.AcceptedAnswerId = a.Id
  AND b.ParentId = q.Id
  AND b.Score > a.Score
GROUP BY q.Id
ORDER BY Max(b.Score) DESC

Enter Parameters

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