Average time to Answer a question

0

Please login or register to vote for this query.

(click on this box to dismiss)

Parenting

Q&A for parents, grandparents, nannies and others with a parenting role

-- Time to answer Top 4 tags
/*
SELECT p1.id      AS "AnsID",
  p1.ParentId     AS "QuestionId",
  p1.Creationdate AS "AnsCreationdate",
  p2.Creationdate AS "QuestionCreationdate",
  DATEDIFF(minute, p2.Creationdate, p1.Creationdate) AS Time_Difference
FROM posts p1
JOIN posts p2
ON p1.ParentId     = p2.Id
WHERE p1.PostTypeId=2
AND p1.parentid   IN
  (SELECT pq.id
  FROM posts pq ,
    users u , tags t , posttags pt
  WHERE pq.owneruserid= u.id
  AND pq.id = pt.postid
  AND t.id = pt.tagid
  AND tagname in ('javascript','java','c#','php')
  AND pq.PostTypeId   =1
  AND pq.CreationDate BETWEEN '2012-03-01 00:00:00' AND '2012-03-05 23:59:59');
  
  */
-- Time to answer bottom 4 tags

SELECT p1.id      AS "AnsID",
  p1.ParentId     AS "QuestionId",
  p1.Creationdate AS "AnsCreationdate",
  p2.Creationdate AS "QuestionCreationdate",
  DATEDIFF(minute, p2.Creationdate, p1.Creationdate) AS Time_Difference
FROM posts p1
JOIN posts p2
ON p1.AcceptedAnswerId     = p2.Id
WHERE p1.PostTypeId=2
AND p1.parentid   IN
  (SELECT pq.id
  FROM posts pq ,
    users u , tags t , posttags pt
  WHERE pq.owneruserid= u.id
  AND pq.id = pt.postid
  AND t.id = pt.tagid
  AND tagname in ('c#')
  AND pq.PostTypeId   =1
  AND pq.CreationDate BETWEEN '2013-03-01 00:00:00' AND '2017-12-31 23:59:59');

Enter Parameters

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