WITH TaggedQuestions AS ( SELECT Posts.* FROM Posts JOIN ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mathematics Meta

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

WITH TaggedQuestions AS (
  SELECT Posts.* FROM Posts
  JOIN PostTypes ON Posts.PostTypeId = PostTypes.Id
  JOIN PostTags ON PostTags.PostId = Posts.Id
  JOIN Tags ON PostTags.TagId = Tags.Id
  WHERE PostTypes.Name = 'Question'
  AND   Tags.TagName = '##tag##'
),
TaggedAnswers AS (
  SELECT Posts.* FROM Posts
  JOIN TaggedQuestions ON Posts.ParentId = TaggedQuestions.Id
  JOIN PostTypes ON Posts.PostTypeId = PostTypes.Id
  WHERE PostTypes.Name = 'Answer'
)
SELECT TOP 100
  TaggedAnswers.Id as [Post Link],
  TaggedAnswers.score as 'Score',
  Users.DisplayName as 'User'
FROM TaggedAnswers
JOIN Users ON TaggedAnswers.OwnerUserId = Users.Id
ORDER BY score DESC;

Enter Parameters

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