Codice PHP:

    
SELECT id
,min,max, (min+max)/AS valore_medio FROM tabella ORDER BY valore_medio ASC