I have a table in which there are four data fields; date 1 ('lowest') to date 4 ('highest'). The purpose of each field is to record when a particular state has been entered. It is possible for the states to occur in the orders as follows:
1, 2, 3, 4
1, 2, 3, 2, 1
1, 2, 3, 4, 3, 2, 1
1, 2, 1...