I have data that has service-from and service-to dates. If all of the dates for a particular client are unique, I want to delete them, however, if there is any overlap, I need to keep them. One way that I thought of was to create an array, but I'm not good with those. Any other suggestions?
If your data has one service-from/to pair on each observation, and the dates is all you want to keep, my suggestion is to sort your data in client and service-from (and service-to if necessary) order.
Then use RETAIN or LAG() to compare the current service-from with previous service-tom date. If overlap output the columns you want to keep.