Percentage of questions with at least one answer per day of year

0

Please login or register to vote for this query.

(click on this box to dismiss)

MathOverflow

Q&A for professional mathematicians

SELECT
  DATEPART(dayofyear,CreationDate),
  COUNT(Posts.Id) as Total,
  SUM(CASE when AnswerCount > 0 then 1 else 0 END) as Answered,
  CAST(SUM(CASE when AnswerCount > 0 then 1 else 0 END) as float)/COUNT(Posts.Id) as Ratio
FROM Posts
WHERE PostTypeId=1
GROUP BY DATEPART(dayofyear,CreationDate)
ORDER BY DATEPART(dayofyear,CreationDate) ASC

Enter Parameters

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