Azure question statistics

0

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

create table #unanswered (Id int primary key, Total int)

insert #unanswered
select q.Id as Id, case when q.AcceptedAnswerId is null then -10
when q.AcceptedAnswerId is not null then 0
end as "Total"
from Posts q
join PostTags pt on pt.PostId = q.Id
join Tags t on t.Id = pt.TagId
where t.TagName = 'azure'

select top 20 p.Id as [Post Link], p.ViewCount, p.AnswerCount, p.CommentCount, p.FavoriteCount, case when p.AcceptedAnswerId is null then 'false' else 'true' end as [Answered],
((p.ViewCount * 0.01) + p.AnswerCount + u.Total) as Weight 
from Posts p
join #unanswered u on u.Id = p.Id
join PostTags pt on pt.PostId = p.Id
join Tags t on t.Id = pt.TagId
where t.TagName = 'azure'
order by Weight desc

select t.TagName, count(p.Id)
from Posts p
join #unanswered u on u.Id = p.Id
join PostTags pt on pt.PostId = p.Id
join Tags t on t.Id = pt.TagId
-- where t.TagName = 'azure'
group by t.TagName

Enter Parameters

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