Percentage of closed questions per date

2

Please login or register to vote for this query.

(click on this box to dismiss)

Software Engineering

Q&A for professionals, academics, and students working within the systems development life cycle

-- Percentage of closed questions per date
-- Show what percent of questions has been closed every day

with Questions as (
  select
    cast (CreationDate as date) as 'Date',
    (case when ClosedDate is null then 0 else 1 end) as ClosedQuestion
  from
    Posts
  where
    ParentId is null
)

select
  Date,
  PctClosed = 100 * sum(ClosedQuestion) / count(*)
from
  Questions
group by
  Date
order by 
  Date desc

Enter Parameters

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