This looks like a task for RunJS, but I am still unable to grasp the logic.
You are trying to remove one score for each score which are duplicates. But not for the lower value?
You can play around with the logic in JS with the data returned from DB, and use RunJS to get the desired output to be sent to client side.