Top tags for a given week.

0

Please login or register to vote for this query.

(click on this box to dismiss)

Software Quality Assurance and Testing Meta

Q&A about the site for software quality control experts, automation engineers, and software testers

Declare @Year int ,
        @week int

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

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

Enter Parameters

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