MLB_Q3

0

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

select Id as post_id, CreationDate as post_date, AcceptedAnswerId as answer_id into #Temp1 from Posts
where YEAR(CreationDate) = '2017' and PostTypeId = '1' and AcceptedAnswerId is not null


select post_id, post_date, answer_id, Id, CreationDate as answer_date into #Temp2
from #Temp1 T left join Posts P
on T.answer_id = P.Id 
where P.PostTypeId = '2'

select DATEDIFF(ss, post_date, answer_date) as time_dif into #Temp3 from #Temp2

select AVG(cast(time_dif as bigint)) from #Temp3

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results