/* postgres can not */ use plato; --insert into Output select key, max(TablePath()) as table_rec from Input group by key ;