I have airline ticket data that contains exchanges. The exchanges reference the preceding ticket in the Originating Ticket column. In this example, Tix1 is the original first ticket, Tix2-5 are exchanges, and Tix5 is the most recent or current ticket. The requirement is to aggregate the $ for these up to the most recent ticket #, Tix5. Any wisdom on how to accomplish this? THANKS!
Ticket | Originating Ticket | Most Recent Ticket |
Tix1 | | Tix5 |
Tix2 | Tix1 | Tix5 |
Tix3 | Tix2 | Tix5 |
Tix4 | Tix3 | Tix5 |
Tix5 | Tix4 | Tix5 |