Top tags for a given week.


Please login or register to vote for this query.

(click on this box to dismiss)

Interpersonal Skills

Q&A for people looking to improve their interpersonal communication skills

Declare @Year int ,
        @week int

set @year = ##year:int##
set @week = ##month:int##

SELECT TOP 200 t.tagname, 
               sum(p.viewcount) k 
FROM   posts p 
       INNER JOIN posttags pt 
               ON = pt.postid 
       INNER JOIN tags t 
               ON pt.tagid = 
       Year(p.creationdate) = @Year 
       AND Datepart(month, p.creationdate) = @Week
GROUP  BY t.tagname
ORDER  BY sum(p.viewcount) DESC

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results