Internal join the transaction table with the end result from Step 2, then you'll have the entire data in the transaction table with only Each and every customer's newest history. Yet another solution would be to use a NOT EXISTS condition within your join issue to test for later purchases: https://becketturfse.pages10.com/how-to-join-a-outlaw-motorcycle-club-fundamentals-explained-71893914