select 'site://q/' + cast(q.id as nvarchar) +'| question'...

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 'site://q/' + cast(q.id as nvarchar) +'| question' as [link]
     , q.creationdate as [q create]
     , q.deletiondate as [q del]
     , a.creationdate as [a create]
     , a.deletiondate as [a del]
     , datediff(n, a.creationdate, q.deletiondate) as [q del after a]
from postswithdeleted a 
inner join postswithdeleted q on a.parentid = q.id
where a.deletiondate is not null
and q.deletiondate is not null 
and datediff(n, a.creationdate, q.deletiondate) < 60
order by datediff(n, a.creationdate, q.deletiondate) desc

Enter Parameters

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