Tags by unanswered/total ratio over the past 12 months

1

Please login or register to vote for this query.

(click on this box to dismiss)

A list of tags sorted by ratio of posts without answers

Stack Overflow

Q&A for professional and enthusiast programmers

-- Least answered tags (relative)
-- A list of tags sorted by ratio of posts without answers

SELECT TOP 100
    'site://tags/'+TagName+'/topusers|'+TagName AS [Tag Link],
    UnansweredCount AS [Unanswered],
    Total,
    ROUND( 100* ((1.0 * UnansweredCount) / Total) , 2) AS [Percent unanswered]
FROM (
    SELECT 
        TagName,
        SUM(CASE
            WHEN Post.AnswerCount > 0 THEN 1
            ELSE 0
        END) AS AnsweredCount,
        SUM(CASE
           WHEN Post.AnswerCount = 0 THEN 1
           ELSE 0
        END) AS UnansweredCount,
        COUNT(*) AS Total
    FROM
        Tags AS Tag
        INNER JOIN PostTags AS PostTag ON
            PostTag.TagId = Tag.Id
        INNER JOIN Posts AS Post ON
            Post.Id = PostTag.PostId
    WHERE
        Post.Score >= 0
        AND
        Post.ClosedDate IS NULL
        AND
        DATEPART(m, Post.CreationDate) >= DATEPART(m, DATEADD(m, -##MonthsNumber?12##, GETDATE()))
    GROUP BY
       Tag.TagName
) As TagStatistics
WHERE
    Total >= ##MinQuestions?100##
ORDER BY
    ((1.0 * UnansweredCount) / Total) DESC

Enter Parameters

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