Q&A for professional mathematicians
select q.Id, min(datediff(minute, q.CreationDate, a.CreationDate)) as [TimeInterval] from Posts q inner join Posts a on a.ParentId=q.Id where q.Id > ##minId## group by q.Id order by q.Id asc