Most-closed Tags

1

Please login or register to vote for this query.

(click on this box to dismiss)

This query orders tags by the number of closed (and non-deleted, obviously) questions as a percentage of total questions with that tag.

Mathematics

Q&A for people studying math at any level and professionals in related fields

SELECT
  TagName,
  numClosed as [Number Closed],
  totalTagged as [Total],
  numClosed * 100.0 / totalTagged as [Percentage]
FROM (
  SELECT
    t.TagName, 
    SUM(case when p.ClosedDate IS NOT NULL then 1 end) as numClosed,
    count(p.Id) as totalTagged
  FROM Tags AS t 
    INNER JOIN PostTags pt ON t.Id = pt.TagId
    INNER JOIN Posts P ON p.Id = pt.PostId
  GROUP BY t.TagName
  ) subquery
WHERE totalTagged > 0
ORDER BY [Percentage] DESC

Enter Parameters

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