tag trend count per month

0

Please login or register to vote for this query.

(click on this box to dismiss)

Tridion

Q&A for Tridion developers and administrators

SELECT m.Month, sum(m.Questions) as Questions

FROM
(
SELECT
  DATEADD(mm, (Year(Posts.CreationDate) - 1900) * 12 + Month(Posts.CreationDate) - 1, 0) AS Month,
  COUNT(*) AS Questions

FROM Tags
  LEFT JOIN PostTags ON PostTags.TagId = Tags.Id
  LEFT JOIN Posts ON Posts.Id = PostTags.PostId
  LEFT JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId

WHERE
  Tags.TagName IN (
    'tensorflow',
    'pytorch',
    'keras'
  ) AND
  
  Year(Posts.CreationDate) > 2015
  AND
  
  PostTypes.Name = 'Question'
  
GROUP BY
  Year(Posts.CreationDate), Month(Posts.CreationDate), Tags.TagName
) as m

GROUP BY
  m.Month

Enter Parameters

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