1 2
/* syntax version 1 */ select sum(c) as sumc, max(d) as maxd from plato.Input group by a order by sumc, maxd;