I have trouble defining a condition in to my script. I have Loaded a table from a single source and I need to filter it based on the below condition.
Within the same serial number(that is serial + suffix set). Look for the First Lost Charges entry, then look within the suffix where that charge occurred and if there is a Lost Credits entry - ignore/continue to the next Lost charges, if there is no Lost Credits entry for that suffix, but there is a Lost Charges - load all the follow up data for that serial including the Lost Charges (not just that suffix).