Test

0

Please login or register to vote for this query.

(click on this box to dismiss)

Genealogy and Family History Meta

Q&A about the site for expert genealogists and people interested in genealogy or family history

SELECT post_year, post_month, TagName, total_count, SUM(total_count) as TT
FROM (

    SELECT datepart(year,posts.CreationDate) as post_year, 
         datepart(month,posts.CreationDate) as post_month, 
         tags.TagName , 
         COUNT(*) as total_count
  FROM PostTags as pt
    INNER JOIN POSTS as posts ON pt.PostId = posts.Id
    INNER JOIN Tags as tags ON pt.TagId = tags.Id
    WHERE tags.TagName in ('python', 'javascript')
  GROUP BY datepart(year,posts.CreationDate), 
           datepart(month,posts.CreationDate), 
           tags.TagName
           ) AS sub
GROUP BY post_year, 
         post_month, 
         TagName,
         total_count

Enter Parameters

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