Most and least dangerous tags to answer (among the tags with 1000+ questions)

0

Please login or register to vote for this query.

(click on this box to dismiss)

This query shows the number of upvotes, downvotes and D/U ratio for the answers to the most common tags

Ask Ubuntu

Q&A for Ubuntu users and developers

-- Most and least dangerous tags to answer (among the tags with 1000+ questions)
-- This query shows the number of upvotes, downvotes and D/U ratio for the answers to the most common tags

SELECT Tags.TagName, (
    SELECT COUNT(*)
    FROM Posts
    JOIN PostTags ON Posts.Id = PostTags.PostId
    WHERE Posts.PostTypeId = 1 AND PostTags.TagId = Tags.Id
  ) AS Questions, (
    SELECT COUNT(*)
    FROM Posts
    JOIN PostTags ON Posts.Id = PostTags.PostId
    WHERE Posts.PostTypeId = 1 AND PostTags.TagId = Tags.Id AND Posts.AcceptedAnswerId > 0
  ) AS [Have Accepted Answers], (
    SELECT COUNT(Posts.Score)
    FROM Posts
    JOIN Posts as p2 ON p2.AcceptedAnswerId = Posts.Id
    JOIN PostTags ON p2.Id = PostTags.PostId
    WHERE p2.PostTypeId = 1 AND PostTags.TagId = Tags.Id AND Posts.AcceptedAnswerId > 0
  ) AS [Average Answer Score]
  FROM Tags
  ORDER BY [Average Answer Score] DESC

Enter Parameters

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