Custom - Median of Stackoverflow questions

0

Please login or register to vote for this query.

(click on this box to dismiss)

Italian Language Meta

Q&A about the site for students, teachers, and linguists wanting to discuss the finer points of the Italian language

-- 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 to main site
loading Hold tight while we fetch your results