Objective: select entries in priority with a larger difference between table.ball and table.maxBall

id | ball | maxBall 1 3 3 2 2 3 3 1 4 

That is, the sample should give id 3 -> 2 -> 1

  • 2
    order by maxBall - ball desc - Mike

0