It joins the input data to itself on “product” which is kind of a cross-join but not quite a full cross join. It uses a rule to determine if the dates overlap (ignoring where a row has been joined to itself), and marks the overlap with a new column. It then joins those rows marked as overlapped back with the original data set, puts back the original rowids that somehow got mixed up (maybe some other way of doing that bit but I was in a hurry!) and returns at the end with the original data set plus a new “is overlapped product” indicator showing Y or N for each row.
There might be other ways to do this, but this was me putting it down as I thought of each step, and hopefully can give you some pointers.
Hi,
Wow I’m so impressed! That’s exactly what I wanted!
A big big thanks.
Now I’m trying to understand the logic to not just becoming a script kiddie
Thanks a lot.