Number of posts by tags - weekly

0

Please login or register to vote for this query.

(click on this box to dismiss)

The Workplace Meta

Q&A about the site for members of the workforce navigating the professional setting

select 
  DATEADD(week, DATEDIFF(week, 0, p.creationdate - 1), 0) AS week,
  t.tagname,
  count(p.id) as cnt_posts
from posts as p
  left join postTags as pt
    on p.id = pt.postid
  left join tags as t 
    on pt.tagid = t.id
where 
  p.creationdate >= '2018-01-05' and 
  tagname in ('android','kotlin')group by 
  datepart(ww, p.creationdate), 
  DATEADD(week, DATEDIFF(week, 0, p.creationdate - 1), 0),
  t.tagname
order by week

Enter Parameters

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