database popularity

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 TagName, count(*) frequency
from Posts 
join PostTags pt on pt.PostId = Posts.Id
join Tags t on t.Id = pt.TagId
where TagId in 
  (
    select top 20 Id from Tags 
    order by Count desc
  ) and CreationDate > DATEADD(year, -1, GetDate())
group by tagName
order  by frequency desc

Enter Parameters

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