I have a scenario where everything in my hits(rows) is the same as above except that I now have 2 different IDs in the ID column . I want to try to retrieve the best match/(row) for each ID based on their top score. For instance, the actual IDs in hits - pwc and pwz respectively.
I have tried to sort IDs first and then scores:
<code>@hITS = sort ($a->{qID} cmp $b->{qID} || $b->{score} <=> $a->{score})@hITS;
now I would like to retrieve best score/row for each ID: