improved upon the solution by having the dates in ascending order and the reason for the book unavailability in the same order as the days. struggled a bit on how to group the data into consecutive days groups and ended up using the datetimediff function.