Q&A about the site for committed Christians, experts in Christianity and those interested in learning more
COUNT(*) AS NumPosts,
ROUND((100.0 * COUNT(*)) / SUM(COUNT(*)) OVER (), 2) AS PercentPosts
WHEN AnswerCount >= 1 THEN 'Yes'
END AS HasAnswer,
WHEN DeletionDate IS NOT NULL THEN 'Deleted'
WHEN ClosedDate IS NOT NULL THEN 'Closed'
END AS State
WHERE PostTypeId = 1 -- Questions
) AS x
GROUP BY HasAnswer, State
ORDER BY HasAnswer, State