Select top 20 tags in June 2012

0

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS Meta

Q&A about the site for administrators, end users, developers and designers for Craft CMS

select TOP 20
    tags.tagname, count(*) AS tagcount
from Posts
    INNER JOIN PostTags ON PostTags.PostId = Posts.id
    INNER JOIN Tags     ON Tags.id         = PostTags.TagId
where
    datepart(year,  Posts.CreationDate) = 2012 and
    datepart(month, Posts.CreationDate) = 6
Group by tags.tagname
Order by tagcount DESC

Enter Parameters

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