Questions where accepted answers don't have the highest score (non-self accepted) (AA not HNQ Only)


Please login or register to vote for this query.

(click on this box to dismiss)

Role-playing Games

Q&A for gamemasters and players of tabletop, paper-and-pencil role-playing games

distinct q.Id as [Post Link], 
aa.Score as 'accepted answer score', 
hs.Score as 'highest answer score',
hs.Score - aa.Score as 'score difference'
Posts as q 
inner join PostHistory as hnq on q.Id = hnq.PostId and hnq.PostHistoryTypeId=52 --- became Hot Network Question
left join PostHistory as lhnq on = lhnq.PostId and lhnq.PostHistoryTypeId=53 --- left Hot Network Questions
left join Posts as aa on q.Id = aa.ParentId --- aa: accepted answer
left join Posts as hs on q.Id = hs.ParentId --- hs: highest scoring answer
q.PostTypeId = 1 and
q.AcceptedAnswerId is not null and
q.AnswerCount > 1 and
aa.Score < hs.Score and
(hnq.CreationDate > aa.CreationDate  or lhnq.CreationDate < aa.CreationDate) and -- The accepted answer was posted while it was not a HNQ
aa.Id = q.AcceptedAnswerId and
hs.Score = (Select max(score) from Posts csq where csq.ParentId = and
aa.OwnerUserID != q.OwnerUserId
order by 'score difference' DESC;

Enter Parameters

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