Q&A about the site for members of the workforce navigating the professional setting
-- 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