Unanswered questions migrated to dba.se

0

Please login or register to vote for this query.

(click on this box to dismiss)

Network Engineering

Q&A for network engineers

select count (p.id) 
  from Posts p
  join PostTypes pt
    on p.PostTypeID = pt.ID
   and pt.Name = 'Question'
  join PostHistory ph
    on ph.PostID = p.ID
  join PostHistoryTypes pht
    on pht.id = ph.PostHistoryTypeID
   and pht.Name = 'Post Migrated Here'
 where exists
       (select 1
          from Posts ap
          join PostTypes apt
            on apt.Id = ap.PostTypeID
           and apt.Name = 'Answer'
         where ap.ParentID = p.Id)
   and not exists
       (select 1
          from Posts ap
          join PostTypes apt
            on apt.Id = ap.PostTypeID
           and apt.Name = 'Answer'
         where ap.ParentID = p.Id
           and ap.CreationDate >= ph.CreationDate)

Enter Parameters

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