Answered Count by Post State

0

Please login or register to vote for this query.

(click on this box to dismiss)

Christianity Meta

Q&A about the site for committed Christians, experts in Christianity and those interested in learning more

SELECT
    HasAnswer,
    COUNT(*) AS NumPosts,
    ROUND((100.0 * COUNT(*)) / SUM(COUNT(*)) OVER (), 2) AS PercentPosts
FROM (
    SELECT
        CASE
            WHEN AnswerCount = 0 THEN 'No'
            ELSE 'Yes'
        END AS HasAnswer
    FROM Posts
    WHERE
        Posts.PostTypeId = 1 -- Questions
        AND DeletionDate IS NULL
        AND ClosedDate IS NULL
) AS x
GROUP BY HasAnswer

Enter Parameters

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