select top 10 a.id as [Post Link], a.owneruserid as [User...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select top 10
  a.id as [Post Link],
  a.owneruserid as [User Link],
  datediff(day, a.creationdate, accept.creationdate)
from posts a
inner join votes accept on a.id = accept.postid
where a.posttypeid = 2
and accept.votetypeid = 1
order by datediff(day, a.creationdate, accept.creationdate) desc

Enter Parameters

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