SELECT
    "t207"."values_1_217" AS "values_1_220",
    "t207"."expr218" AS "expr221"
FROM
    (
        SELECT
            "t209"."values_1_208" AS "values_1_217",
            "t216"."expr215" AS "expr218"
        FROM
            (
                SELECT
                    "column1" AS "values_0_208",
                    "column2" AS "values_1_208",
                    "column3" AS "values_2_208"
                FROM
                    (
                        VALUES
                            ($1, $2, $3),
                            ($4, $5, $6),
                            ($7, $8, $9)
                    ) AS "t208"
            ) AS "t209"
            INNER JOIN LATERAL (
                SELECT
                    ARRAY_AGG("t210"."values_2_213") AS "expr215"
                FROM
                    (
                        SELECT
                            "t212"."values_2_211" AS "values_2_213"
                        FROM
                            (
                                SELECT
                                    "column1" AS "values_0_211",
                                    "column2" AS "values_1_211",
                                    "column3" AS "values_2_211"
                                FROM
                                    (
                                        VALUES
                                            ($10, $11, $12),
                                            ($13, $14, $15),
                                            ($16, $17, $18)
                                    ) AS "t211"
                            ) AS "t212"
                        WHERE
                            "t209"."values_0_208" = "t212"."values_1_211"
                    ) AS "t210"
            ) AS "t216" ON TRUE
    ) AS "t207"
ORDER BY
    "t207"."values_1_217" ASC
