Median response time

0

Please login or register to vote for this query.

(click on this box to dismiss)

Christianity

Q&A for committed Christians, experts in Christianity and those interested in learning more

-- Enter Query Title
-- Enter Query Description


with diffs as
(select cast(a.creationdate - q.creationdate as float) as d from posts q
join posts a on a.id = q.acceptedanswerid)

SELECT
(
 (SELECT MAX(d) FROM
   (SELECT TOP 50 PERCENT d FROM diffs ORDER BY d) AS BottomHalf)
 +
 (SELECT MIN(d) FROM
   (SELECT TOP 50 PERCENT d FROM diffs ORDER BY d DESC) AS TopHalf)
) / 2 AS Median

Enter Parameters

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