Q&A about the site for Ubuntu users and developers
SELECT * FROM (select top(10) Id, PostTypeId, AcceptedAnswerId, ParentId, CreationDate, Score, ViewCount, Body, Title,AnswerCount from Posts where Creationdate >='2016-01-01 00:00:00' and Creationdate < '2018-01-01 00:00:00' and ClosedDate is null and PostTypeId=1) num RIGHT JOIN (select a.Id, a.PostTypeId, a.ParentId, a.CreationDate, a.Score, a.ViewCount, a.Body, a.Title,a.AnswerCount from Posts b, Posts a where b.AcceptedAnswerId = a.Id and a.Creationdate >='2016-01-01 00:00:00' and a.Creationdate < '2018-01-01 00:00:00') dum ON (num.AcceptedAnswerId = dum.Id);