1 2 3 4 5 6
INSERT INTO plato.Output SELECT * FROM ( SELECT lead(TableRow()) over () FROM plato.Input) flatten columns