Q&A for professional and enthusiast programmers
declare @today as DateTime = (select max(CreationDate) from Posts);
select distinct Percentile_Cont(.5)
within group (order by datediff(minute, s1.CreationDate, coalesce(ApprovalDate,RejectionDate))*1.0) over () as "Median time-to-review"
from SuggestedEdits s1
inner join Posts p on p.id = s1.PostId
p.PostTypeId in (4, 5) and
s1.CreationDate > @today-##LookbackDays?365##