select distinct * from posts p inner join posttags pt on pt.postid = p.id inner join tags t on pt.ta

0

Please login or register to vote for this query.

(click on this box to dismiss)

Joomla

Q&A for Joomla! administrators, users, developers and designers

SELECT TOP ##NumberOfQuestionsToFetch##
          question.Id AS QuestionId, 
          question.Score AS QuestionScore,
          question.Title AS QuestionTitle,
          question.Body AS QuestionBody,
          question.Tags,
          answer.Id AS AcceptedAnswerId,
          answer.Score AS AnswerScore,
          answer.Body AS AnswerBody
FROM Posts AS question
JOIN Posts AS answer on question.AcceptedAnswerId = answer.Id
INNER JOIN PostTags AS question_tags on question_tags.PostId = 
question.Id
INNER JOIN Tags on question_tags.TagId = Tags.Id
WHERE question.Id > ##LastFetchedQuestionId## AND 
      Tags.TagName IN ('##Tag##')
ORDER BY question.Id ASC

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results