I need to compare the result of a query to not repeat the result.
For example: I have in the unit register your cod and speed, but I can have 2 situations:
1) more than one occurrence for the same unit and different speeds, and need to be listed only the occurrence of the highest speed.
cod - velocidade
100 - 128
100 - 512
As a result of the precise search, list only the highest value: 100-512
2) I can also have the return of more occurrences with the same information, but I need to list only one of them:
cod - velocidade
105 - 512
105 - 512
105 - 512
I need only list 1x: 105-512
How can I be doing these checks?