What question has the most cycles of Close/Reopen?

0

Please login or register to vote for this query.

(click on this box to dismiss)

https://meta.stackexchange.com/questions/277175/what-question-has-the-most-cycles-of-close-reopen

Stack Overflow

Q&A for professional and enthusiast programmers

select id
     , title
     , [closed]
     , [re-opened]
from posts p
inner join (
select top 10 postid
     , [10] as [closed]
     , [11] as [re-opened]
     from ( select postid, posthistorytypeid 
            from posthistory
            where posthistorytypeid in (10,11) --close/reopen
           ) as src
pivot ( 
  count(posthistorytypeid)
  for posthistorytypeid
  in ([10], [11])
) as pvt
order by [10]+[11] desc
) ph on ph.postid = p.id
order  by [closed]+ [re-opened] desc

Enter Parameters

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