StackOverflow Cloud Platform Tag Popularity in Most Recent Month

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

-- Popularity of StackOverflow cloud platform tags during most recent month and last 12 months

select 
       mm.TagName as Tag,
       row_number() over (order by mm.Rate desc) as MonthRank,
       row_number() over (order by qq.Rate desc) as QuarterRank,
       row_number() over (order by yy.Rate desc) as YearRank,
       row_number() over (order by tt.Rate desc) as TotalRank,
       mm.Rate as QuestionsInMonth,
       qq.Rate as QuestionsInQuarter,
       yy.Rate as QuestionsInYear,
       tt.Rate as QuestionsTotal,
       mm.MonthViews,
       qq.QuarterViews,
       yy.YearViews,
       tt.TotalViews,
       mm.MonthComments,
       qq.QuarterComments,
       yy.YearComments,
       tt.TotalComments,
       mm.MonthAnswers,
       qq.QuarterAnswers,
       yy.YearAnswers,
       tt.TotalAnswers

from

(select count(PostId) as Rate, TagName, sum(ViewCount) as MonthViews, sum(CommentCount) as MonthComments, count(AcceptedAnswerId) as MonthAnswers
from
  Tags, PostTags, Posts
where Tags.Id = PostTags.TagId and Posts.Id = PostId
and Posts.CreationDate < DATEADD(mm, DATEDIFF(mm, 0, GETDATE()), 0)
and Posts.CreationDate > DATEADD(mm, DATEDIFF(mm, 0, GETDATE()) - 1, 0)
group by TagName) as mm

INNER JOIN

(select count(PostId) as Rate, TagName, sum(ViewCount) as QuarterViews, sum(CommentCount) as QuarterComments, count(AcceptedAnswerId) as QuarterAnswers
from
  Tags, PostTags, Posts
where Tags.Id = PostTags.TagId and Posts.Id = PostId
and Posts.CreationDate < DATEADD(mm, DATEDIFF(mm, 0, GETDATE()), 0)
and Posts.CreationDate > DATEADD(mm, DATEDIFF(mm, 0, GETDATE()) - 3, 0)
group by TagName)
as qq ON mm.TagName = qq.TagName

INNER JOIN

(select count(PostId) as Rate, TagName, sum(ViewCount) as YearViews, sum(CommentCount) as YearComments, count(AcceptedAnswerId) as YearAnswers
from
  Tags, PostTags, Posts
where Tags.Id = PostTags.TagId and Posts.Id = PostId
and Posts.CreationDate < DATEADD(mm, DATEDIFF(mm, 0, GETDATE()), 0)
and Posts.CreationDate > DATEADD(mm, DATEDIFF(mm, 0, GETDATE()) - 12, 0)
group by TagName)
as yy ON mm.TagName = yy.TagName

INNER JOIN

(select count(PostId) as Rate, TagName, sum(ViewCount) as TotalViews, sum(CommentCount) as TotalComments, count(AcceptedAnswerId) as TotalAnswers
from
  Tags, PostTags, Posts
where Tags.Id = PostTags.TagId and Posts.Id = PostId
group by TagName)
as tt ON mm.TagName = tt.TagName
where mm.TagName in ('amazon-web-services', 'azure', 'google-cloud-platform', 'databricks')
order by mm.rate desc
;

Enter Parameters

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