CREATE TABLE v0 (v1 INT , v2 INT);
CREATE TABLE v3 AS SELECT 1, v1 FROM v0;
CREATE TRIGGER v9 BEFORE INSERT ON v3 FOR EACH ROW INSERT INTO v0 VALUES (42 , ( SELECT v2 FROM v3 AS v7 NATURAL JOIN v0 AS v4 ORDER BY v2 , v1 < ( SELECT v2 FROM v3 AS v8 GROUP BY ( SELECT v2 FROM v3 ) , v2 ) ASC));
INSERT INTO v3 (v1) VALUES (16);
