Q&A for professional and enthusiast programmers
SELECT TagOfInterest, NumClosed, NumQuestions, NumClosed * 100.0 / NumQuestions AS PercentClosed FROM ( SELECT TagOfInterest, COUNT(CASE WHEN ClosedDate IS NOT NULL THEN 1 END) AS NumClosed, COUNT(*) AS NumQuestions FROM ( SELECT CASE WHEN LOWER(Tags) LIKE '%<powershell>%' THEN '[powershell]' WHEN LOWER(Tags) LIKE '%<bash>%' THEN '[bash]' WHEN LOWER(Tags) LIKE '%<cmd>%' THEN '[cmd]' END AS TagOfInterest, ClosedDate FROM Posts WHERE PostTypeId = 1 -- Questions AND ( LOWER(Tags) LIKE '%<powershell>%' OR LOWER(Tags) LIKE '%<bash>%' OR LOWER(Tags) LIKE '%<cmd>%' ) ) CommandLineQuestions GROUP BY TagOfInterest ) CountsByTag