sort by sum per cat