SELECT * FROM (select top(10) Id, PostTypeId, AcceptedAns...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Ubuntu Meta

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);

Enter Parameters

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