Posts with a screwed-up history


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 PostId [Post Link],
  coalesce(sum(choose(posthistorytypeid-9,1,-1)), 0) closed,
  coalesce(sum(choose(posthistorytypeid-13,1,-1)), 0) locked,
  coalesce(sum(choose(posthistorytypeid-18,1,-1)), 0) protected
from posthistory
group by PostId
having coalesce(sum(choose(posthistorytypeid-9,1,-1)), 0) not in(0, 1)
  or coalesce(sum(choose(posthistorytypeid-13,1,-1)), 0) not in(0, 1)
  or coalesce(sum(choose(posthistorytypeid-18,1,-1)), 0) not in(0, 1)

Enter Parameters

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