I am looking to get accountnumbers which has status = 5 and that changed to status = 8. There should not be any intermediate status in between these two status. Please suggest how do I get this in single query. They have effective dates associated with each status.
Quick response is appreciated!