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