I need to return only the highest value of one of the lines below, taking into account that I also need to submit the order code.
I tried to run via cursor but without success. By the cursor would pass the 3 lines, but would need to consider only one of greater value.
How do I resolve this? Some help? Am I on the right track?