median response time by tag (for any answer) Final

0

Please login or register to vote for this query.

(click on this box to dismiss)

Computational Science Meta

Q&A for scientists using computers to solve scientific problems

WITH my_table AS
(
  SELECT
    T.TagName,
    DATEDIFF(minute, P.CreationDate, A.CreationDate) AS ResponseMinutes
  FROM
    Posts P
    INNER JOIN Posts A ON P.AcceptedAnswerId=A.Id
    INNER JOIN PostTags PT ON P.Id=PT.PostId
    INNER JOIN Tags T ON T.Id=PT.TagId
  WHERE
    P.PostTypeId=1 AND
    (
      T.TagName in ('c#','java','c++','collision-detection','camera','performance',
 'textures','client-server','physics','geometry','mathematics','animation') AND
      T.Count > 20
    ) AND
    p.AnswerCount > 0
)
   
SELECT DISTINCT TagName,
    PERCENTILE_CONT(0.5) 
    WITHIN GROUP (ORDER BY ResponseMinutes)
    OVER (PARTITION BY TagName) AS Median
FROM my_table

Enter Parameters

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