select name, sum(value) as sumval from mytable group by name order by abs(sumval) desc