Question score distribution

1

Please login or register to vote for this query.

(click on this box to dismiss)

The distribution of scores on questions

Stack Overflow

Q&A for programmers

-- Question score distribution
-- The distribution of scores on questions

WITH TotalPosts AS (
    SELECT CAST(COUNT(*) AS FLOAT) AS Count
    FROM Posts
    WHERE PostTypeId = 1
)
SELECT 
    Score,
    Count(*) AS NumQuestions,
    ROUND( Count(*)/(SELECT Count FROM TotalPosts) *100,3) AS Percentage

FROM Posts

WHERE PostTypeId = 1

GROUP BY 
    Score

ORDER BY 
    Score

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached