Q&A about the site for those interested in the study of the fundamental nature of knowledge, reality, and existence
SELECT q.Id ,q.Title ,q.Body ,q.Tags ,q.Score ,q.ViewCount ,q.ParentId ,a.Score as AnswerScore ,a.Body as Answer FROM Posts as q LEFT JOIN Posts as a ON q.AcceptedAnswerId = a.Id INNER JOIN PostTypes as pt ON q.PostTypeId = pt.Id WHERE DATEPART(YEAR, q.CreationDate) IN (2017, 2018) AND pt.Name LIKE 'Question' ORDER BY q.Score DESC;