/* postgres can not */
USE plato;

insert into Output
select * from Input
order by key desc, subkey desc;