Most-closed Programming Language Tags

0

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.

Stack Overflow

Q&A for professional and enthusiast programmers

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 numClosed IS NOT NULL AND TagName IN (
  'ada',
  'assembly',
  'c',
  'c++',
  'c#',
  'clojure',
  'cobol',
  'coq',
  'd',
  'dart',
  'erlang',
  'f#',
  'fortran',
  'go',
  'haskell',
  'idris',
  'java',
  'javascript',
  'julia',
  'kotlin',
  'matlab',
  'objective-c',
  'ocaml',
  'python',
  'php',
  'q',
  'r',
  'ruby',
  'rust',
  'scala',
  'scheme',
  'sql',
  'swift',
  'typescript'
)
ORDER BY [Percentage] DESC

Enter Parameters

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