select id as [Post Link] , [answer posted] , min([questio...

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 id as [Post Link]
     , [answer posted]
     , min([question edited]) [question edited]
     , min([hours between]) [hours between]
     , count(*)
from
(
select p.id
     , p.creationdate [answer posted]
     , ph.creationdate [question edited]
     , datediff(hh, p.creationdate, ph.creationdate) [hours between]
from posts p
inner join posthistory ph on ph.postid = p.parentid
where p.owneruserid = 2649012
and posttypeid = 2 --A
and ph.userid = p.owneruserid -- by answerer
and ph.posthistorytypeid in (4,5,6) -- edit
and abs(datediff(hh, p.creationdate, ph.creationdate)) <= 12 -- within 12 hours
) data
group by id
    , [answer posted]

Enter Parameters

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