datediff

0

Please login or register to vote for this query.

(click on this box to dismiss)

Chess

Q&A for serious players and enthusiasts of chess

SELECT
AVG(CAST(DATEDIFF(SECOND, p.CreationDate, a.CreationDate) AS BIGINT)) AS avg_secs
FROM Posts p
INNER JOIN Posts a ON a.id = p.AcceptedAnswerId
WHERE p.AcceptedAnswerId IS NOT NULL
  AND datepart(year, p.CreationDate) = 2017
  AND p.PostTypeId = 1

Enter Parameters

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