Tag growth on period

0

Please login or register to vote for this query.

(click on this box to dismiss)

Webmasters

Q&A for pro webmasters

select 
       num.TagName as [Tagname],
       row_number() over (order by rate.Rate desc) as MonthRank,
       row_number() over (order by num.Num desc) as TotalRank,
       rate.Rate as QuestionsInPeriod,
       num.Num as QuestionsTotal,
       cast(rate.Rate as float) / cast(num.Num as float) * 100 as Growth

from

(select count(PostId) as Rate, TagName
from
  Tags, PostTags, Posts
where Tags.Id = PostTags.TagId and Posts.Id = PostId
and Posts.CreationDate >= '##Date1?2022-01-01##'
and Posts.CreationDate <= '##Date2?2022-01-31##'
group by TagName) as rate

INNER JOIN

(select count(PostId) as Num, TagName
from
  Tags, PostTags, Posts
where Tags.Id = PostTags.TagId and Posts.Id = PostId
group by TagName
having count(PostId) >= ##min?5000##)
as num ON rate.TagName = num.TagName
order by cast(rate.Rate as float) / cast(num.Num as float) desc

Enter Parameters

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