ja

0

Please login or register to vote for this query.

(click on this box to dismiss)

Skeptics

Q&A for scientific skepticism

SELECT 
    YEAR(Posts.CreationDate) AS Year,
    Tags.TagName,
    COUNT(*) AS NumberOfQuestions
FROM Posts
JOIN PostTags ON Posts.Id = PostTags.PostId
JOIN Tags ON PostTags.TagId = Tags.Id
WHERE 
    Posts.PostTypeId = 1 -- 1 is for Questions
GROUP BY 
    YEAR(Posts.CreationDate),
    Tags.TagName
ORDER BY 
    YEAR(Posts.CreationDate), 
    NumberOfQuestions DESC

Enter Parameters

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