Q&A for professional and enthusiast programmers
-- 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