select top ##maxposts:int?1000## substring(ph.text, 1, 10...

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 ##maxposts:int?1000## substring(ph.text, 1, 100), a.id [Post Link]
, q.id, a.creationdate, q.creationdate
from posts a
join posts q on q.id=a.parentid
join posthistory ph on ph.postid=a.id and ph.posthistorytypeid=2
where datediff(d, q.creationdate, a.creationdate) > 30
  and (substring(ph.text, 1, 100) like '% late %'
    or substring(ph.text, 1, 100) like '% old %')
order by a.creationdate desc

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results