mysql_query('SELECT * FROM table ORDER BY '.round($a['dmg'] / max($a['wins'] + $a['losses'], 1)).' DESC');