Fetch the max and than if there is equal take max field