Tag Count by Day

0

Please login or register to vote for this query.

(click on this box to dismiss)

Computational Science

Q&A for scientists using computers to solve scientific problems

-- Tag Count By Month/Year

Declare @tagname as varchar(50)
SET @tagname = Lower(##TagName:string##)

SELECT creationdate,
       t.TagName, 
       COUNT(p.id)           cnt 
FROM   posts p 
       INNER JOIN posttags pt 
         ON p.id = pt.postid 
       INNER JOIN tags t 
         ON pt.tagid = t.id 
WHERE  p.posttypeid = 1 
and t.TagName =  @tagname 
GROUP BY
       creationdate,
t.TagName
ORDER BY 
       creationdate
       

Enter Parameters

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