• I've solved it and it was pretty obvious in the end. My where predicate was excluding the rows with the earlier times from the query because I was only interested in certain event types. If the minimum time associated with a HistoryID was the wrong event type I'd exclude it. :Headdesk:


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537