Q&A for practitioners of the art and science of signal, image and video processing
select AVG(cast(Diff as BIGINT)) from (select DateDiff(second, P.CreationDate, C.CreationDate) as Diff from Posts as P join Comments as C on C.PostId = P.Id where year(P.CreationDate) = 2017 and P.PostTypeId = 1) as a