select distinct q.Id as [Post Link], q.CreationDate as Cr...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

select 
distinct q.Id as [Post Link], 
q.CreationDate as Created,
aa.Score as 'accepted answer score', 
hs.Score as 'highest answer score',
hs.Score - aa.Score as 'score difference'
from 
Posts as q 
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
where 
q.PostTypeId = 1 and
q.AcceptedAnswerId is not null and
q.AnswerCount > 1 and
aa.Score < hs.Score and
aa.Id = q.AcceptedAnswerId and
hs.Score = (Select max(score) from Posts csq where csq.ParentId = q.id)
order by Created DESC;

Enter Parameters

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