Q&A for those committed to a vegan or vegetarian lifestyle and anyone interested in learning more
SELECT p.Id AS [Post ID], p.PostTypeId, -- Type of post (1 = Question, 2 = Answer) p.ParentId, -- If it's an answer, the parent question's ID p.Title, p.Body, -- Content of the post p.Score, p.CreationDate, p.ViewCount, p.AnswerCount, p.CommentCount, p.OwnerUserId, -- User who posted u.DisplayName, -- Username of the post owner u.Reputation, -- Reputation of the user a.AcceptedAnswerId, -- If the post is a question, the accepted answer ID a.AnswerCount AS TotalAnswers, -- Total number of answers for the question t.TagName -- Tags associated with the post FROM Posts p JOIN PostTags pt ON p.Id = pt.PostId JOIN Tags t ON pt.TagId = t.Id LEFT JOIN Users u ON p.OwnerUserId = u.Id LEFT JOIN Posts a ON p.Id = a.ParentId AND p.PostTypeId = 1 -- Join for answers, where parent is a question WHERE t.TagName = 'highcharts' ORDER BY p.CreationDate DESC