Preguntas y respuestas sobre el sitio para programadores y profesionales de la informática
select top 20 p.Id as [Question], p.Title as [Title], p2.CreationDate as [Answered], v.CreationDate as [Accepted], DATEDIFF(day,p2.CreationDate,v.CreationDate) as [days passed] from Posts as p join Posts as p2 on p.AcceptedAnswerId=p2.Id join Votes as v on p2.Id=v.PostId where p.PostTypeId = 1 and v.VoteTypeId = 1 order by DATEDIFF(day,p2.CreationDate,v.CreationDate) desc