Popularity of 'R'

0

Please login or register to vote for this query.

(click on this box to dismiss)

Worldbuilding

Q&A for writers/artists using science, geography and culture to construct imaginary worlds and settings

SELECT 
    YEAR(CreationDate) AS QuestionYear,
    COUNT(CASE WHEN Tags LIKE '%<r>%' THEN 1 END) AS R_Questions,
    COUNT(*) AS TotalQuestions,
    SUM(COUNT(*)) OVER (ORDER BY YEAR(CreationDate)) AS Year_Total,
    ROUND(
        (COUNT(CASE WHEN Tags LIKE '%<r>%' THEN 1 END) * 100.0) / COUNT(*), 
        2
    ) AS R_Percentage
FROM 
    Posts
WHERE 
    PostTypeId = 1 -- 1 = Questions
GROUP BY 
    YEAR(CreationDate)
ORDER BY 
    QuestionYear;

Enter Parameters

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