select Score, (select max(Score) from Posts where ParentI...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select Score, (select max(Score) from Posts where ParentId=a.ParentId) TopAnswerScore, Id [Post Link]
from Posts a
where CreationDate > getdate()-90
and PostTypeId=2
and exists (select 1 from PostHistory h where PostHistoryTypeId=12 and PostId=a.Id and datediff(minute, a.CreationDate, h.CreationDate) < 5)

Enter Parameters

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