Percentage of Closed Questions Based on Tags

0

Please login or register to vote for this query.

(click on this box to dismiss)

TeX Meta

Q&A about the site for users of TeX, LaTeX, ConTeXt, and related typesetting systems

-- Percentage of closed questions based on tags.

with totals as(
select top 200
t.TagName as 'Tag',
count(*) as 'TotalQuestions',
count(p.ClosedDate) as 'ClosedQuestions'
from Posts p
join PostTags pt on pt.PostId = p.id
join Tags t on pt.TagId = t.id
group by t.id, t.TagName
order by TotalQuestions desc
)
select *, round(100 * ClosedQuestions/TotalQuestions, 2) as 'Percentage' from totals
order by Percentage desc

Enter Parameters

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