It's easy to explain. Here's the unique dates version:
1. Assign a number to all rows in order by their dates.
2. Subtract the number of rows existing *before and including* this row that have the same status code (whatever the second column is that you want to detect changes in).
3. You'll find that for the same status, all the items with the same subtraction result have the same value.