number of posts per month by tagname

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT
  YEAR(Posts.CreationDate) as year,
  MONTH(Posts.CreationDate) as month,
  Tags.TagName,
  COUNT(Posts.Id) as sum
FROM Posts 
  JOIN PostTags ON Posts.id = PostTags.PostId
  JOIN Tags ON Tags.Id = PostTags.TagId
WHERE Tags.TagName = 'mongodb' or Tags.TagName = 'couchdb' or Tags.TagName = 'cassandra' or Tags.TagName = 'hadoop' or Tags.TagName = 'hbase'
  GROUP BY YEAR(Posts.CreationDate), MONTH(Posts.CreationDate), Tags.TagName
  ORDER BY YEAR(Posts.CreationDate), MONTH(Posts.CreationDate), sum

Enter Parameters

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