Can you provide the actual calculation using the exampless above?
How are you identifying abedent? A start without a successful?
I am thinking you could leverage a lastest transform on the data as these data need to be correlated on session_id
This will just keep the latest state based on log_id and then the calculations are probably easier