Percentage of closed but not deleted questions

0

Please login or register to vote for this query.

(click on this box to dismiss)

A question that is bad enough to be closed is a candidate for deletion.

Lifehacks Meta

Q&A about the site for people looking to bypass life's everyday problems with simple tricks

-- Percentage of closed but not deleted questions
-- A question that is bad enough to be closed is a candidate for deletion.

select
  Year(creationdate) as [Year], Month(creationdate) as [Month],
  count(id) as [Posted],
  sum(case when closeddate is null then 0 else 1 end) as [Closed but not deleted],
  round(100.0*sum(case when closeddate is null then 0 else 1 end)/count(id),2) as [Percent]
from posts
where posttypeid = 1
group by Year(creationdate), Month(creationdate)
order by Year(creationdate), Month(creationdate);

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results