Tag Question/Answer counts.


Please login or register to vote for this query.

(click on this box to dismiss)

Philosophy Meta

Q&A about the site for those interested in the study of the fundamental nature of knowledge, reality, and existence

WITH TagQACounts AS (
    COUNT(P.Id) AS QuestionCount,
    SUM(CASE WHEN AnswerCount > 0 THEN 1 ELSE 0 END) AS WithAnyAnswer,
    SUM(CASE WHEN AcceptedAnswerId IS NULL THEN 0 ELSE 1 END) AS WithAcceptedAnswer,
    AVG(CAST(P.AnswerCount as decimal(10,2))) AS AvgAnsCount
  FROM Posts P
    INNER JOIN PostTags PT ON PT.PostId = P.Id
    INNER JOIN Tags T ON T.Id = PT.TagId
  GROUP BY T.TagName

SELECT TagName, QuestionCount, WithAnyAnswer, WithAcceptedAnswer, AvgAnsCount,
  (WithAnyAnswer * 100.00)/QuestionCount AS PercentAnswered,
  (WithAcceptedAnswer * 100.00)/QuestionCount AS PercentAccepted
FROM TagQACounts
WHERE TagName IN ('entity framework','dapper')

Enter Parameters

Switch to main site
loading Hold tight while we fetch your results