WITH answered_posts AS( SELECT a.ParentId, MIN(a.Creation...


Please login or register to vote for this query.

(click on this box to dismiss)

Academia Meta

Q&A about the site for academics and those enrolled in higher education

WITH answered_posts AS(
SELECT a.ParentId, MIN(a.CreationDate) AS MinAnswerDate
FROM Posts a
WHERE a.PostTypeId = 2
GROUP BY a.ParentId),

questions AS(
SELECT q.ParentId, q.CreationDate
FROM Posts q
WHERE q.PostTypeId = 1
AND year(q.CreationDate) = '2020'
GROUP BY q.ParentId, q.CreationDate)

SELECT AVG(DATEDIFF(minute, q.CreationDate, a.MinAnswerDate))
FROM questions q
INNER JOIN answered_posts a
ON q.ParentId = a.ParentId;

Enter Parameters

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