SELECT DATEDIFF(second, Answers.AnswerDate, Posts.Creatio...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Ubuntu Meta

Q&A about the site for Ubuntu users and developers

SELECT DATEDIFF(second, Answers.AnswerDate, Posts.CreationDate) as Diff
FROM Posts
JOIN (SELECT Id as AnswerId, CreationDate as AnswerDate
FROM Posts
WHERE PostTypeId = 2) as Answers
ON Posts.AcceptedAnswerId = Answers.AnswerId
WHERE Posts.PostTypeId = 1 AND YEAR(Posts.CreationDate) = 2017;

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results