Tag activity per month

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
  cast(p.creationdate as date),
  t.tagname,
  count(1) as tagcount
from
  posts p 
inner join
  posttags pt
    on pt.postid = p.id
inner join
  tags t
    on t.id = pt.tagid
left join
(
  select
    pt2.tagid,
    p2.id,
    p2.creationdate
  from
    posttags pt2,
    posts p2
) pp
on pp.tagid = t.id
    and pp.id = t.id
    and p.creationdate >= pp.creationdate
where
  t.tagname in('mongodb', 'solr', 'redis')
group by
  cast(p.creationdate as date),
  t.tagname

Enter Parameters

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