I have a data set that is effectively a list of products that are available for rent.
It is structured as:
Product ID#, Rental ID#, StartDate, EndDate
Product IDs can repeat multiple times, Rental IDs are unique, the start date and the end date represent the start and end of a rental period, however at times the rental periods overlap with one another (because of data entry quality issues).
What I am trying to do is
1) Flag the product ids where overlaps occur
2) Count the number of unique days that each product ID was rented for - such that if the rental periods overlap, each day is only counted once.
The ideal solution would be one where the data does not need to be in a static order - however if that is the only way, that's fine.
Any help appreciated!
Bookmarks