Questions answered before they were asked
Q&A for those who study, teach, research and apply economics and econometrics
Select q.Id as [Post Link], q.CreationDate as [Question Asked], min (a.CreationDate) as [Answer Given], Convert(Decimal(10,2), DateDiff(second, min(a.CreationDate), q.CreationDate) / 86400.0) as [Precognition Days] from Posts q, Posts a where q.PostTypeId = 1 and a.PostTypeId = 2 and a.ParentId = q.Id and a.CreationDate < q.CreationDate group by q.Id, q.CreationDate order by [Precognition Days] DESC