How to model state change timeline
I guess you'll need an order state table. You can create a new row every time the state changes for an order (how you do this is up to you: triggers, SP or on the application layer). That table must have a non-null timestamp column to get the time the row was created.