Answer rate on tags

0

Please login or register to vote for this query.

(click on this box to dismiss)

Enter Query Description

Mathematics

Q&A for people studying math at any level and professionals in related fields

-- Answer rate on tags
-- Enter Query Description


SELECT
  TOP 2000
  TagName,
  (
     SELECT
       count(*)
     FROM
       Posts as P1
     INNER JOIN Posts as P2 ON P1.AcceptedAnswerId = P2.Id
     INNER JOIN PostTags as PT ON P1.Id = PT.PostId AND PT.TagId = Tags.Id
  ) as AmountOfAnsweredQuestions,
  (
     SELECT
       count(*)
     FROM
       Posts as P1
     INNER JOIN Posts as P2 ON P1.AcceptedAnswerId = P2.Id
     INNER JOIN PostTags as PT ON P1.Id = PT.PostId AND PT.TagId = Tags.Id
     WHERE P2.Score > 2
  ) as AmountOfQualityAnsweredQuestions,
  (
     SELECT
       count(*)
     FROM
       Posts as P1
     INNER JOIN PostTags as PT ON P1.Id = PT.PostId AND PT.TagId = Tags.Id
  ) as TotalQuestions
FROM
  Tags
Order BY AmountOfAnsweredQuestions DESC, TotalQuestions DESC

Enter Parameters

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