The answer is pretty simple without jumping over hoops or thinking about taking MAX etc.
SELECT value FROM table ORDER BY value DESC LIMIT 1,1
For n as the number,
Lets name the balls 0 1 2 3 4 5 6 7 8 9 for convinience. Step 1 : Take 3 balls from this set lets take 0 1 2 and weigh it against 3 4 5. Weighing 1. Step 1.1 : Now suppose … read on