So while it's possible that the sun actually is the winner, it's not an answer to the question being investigated.
If they can pedant, so can I.
Then it gets controversial results. Imo the base setup is wrong and Sun and Mercury always being the closest is a demonstration of that.
It should either measure the minimum or maximum distance between planets/stars, not the average. Or measure distance between two orbits.