Q&A about the site for scientists using computers to solve scientific problems
WITH CreatedAndAsked AS ( SELECT p1.CreationDate DateAsked, p2.CreationDate DateCreated FROM Posts p1 INNER JOIN Posts p2 ON p1.AcceptedAnswerId = p2.Id WHERE YEAR(p1.CreationDate) = '2017' ) SELECT DATEDIFF(s, DateAsked, DateCreated) FROM CreatedAndAsked