Percent of closed/deleted questions over time

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mathematics

Q&A for people studying math at any level and professionals in related fields

select max(h.t), h.pc as 'Percent of closed/deleted questions over time' from (
  select q.t as t, ntile(100) over (order by q.t) as pc
  from (
    select ClosedDate - CreationDate as t
    from PostsWithDeleted
    where PostTypeID = 1 and ClosedDate is not null
    union
    select DeletionDate - CreationDate as t
    from PostsWithDeleted
    where PostTypeID = 1 and ClosedDate is null and DeletionDate is not null
  ) as q
) as h
where h.t <= '23:59:59'
group by h.pc
order by h.pc

Enter Parameters

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