1 2 3
/* syntax version 1 */ /* postgres can not */ select sum(length(value)), key, subkey from plato.Input group by cube(key,subkey) order by key, subkey;