I cannot look at the example right now. But you could try and use a window function (creating a rank per group and sort of the rest) to identify the right row you want to keep
I cannot look at the example right now. But you could try and use a window function (creating a rank per group and sort of the rest) to identify the right row you want to keep