{
    "query": "CREATE view view_name AS WITH  aa(col1) AS ( SELECT 1 UNION ALL SELECT 2 ) SELECT col1 FROM cte",
    "lexer": {
        "@type": "PhpMyAdmin\\SqlParser\\Lexer",
        "str": "CREATE view view_name AS WITH  aa(col1) AS ( SELECT 1 UNION ALL SELECT 2 ) SELECT col1 FROM cte",
        "len": 95,
        "last": 95,
        "list": {
            "@type": "PhpMyAdmin\\SqlParser\\TokensList",
            "tokens": [
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "CREATE",
                    "value": "CREATE",
                    "keyword": "CREATE",
                    "type": 1,
                    "flags": 3,
                    "position": 0
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 6
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "view",
                    "value": "view",
                    "keyword": "VIEW",
                    "type": 1,
                    "flags": 1,
                    "position": 7
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 11
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "view_name",
                    "value": "view_name",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 12
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 21
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "AS",
                    "value": "AS",
                    "keyword": "AS",
                    "type": 1,
                    "flags": 3,
                    "position": 22
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 24
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "WITH",
                    "value": "WITH",
                    "keyword": "WITH",
                    "type": 1,
                    "flags": 3,
                    "position": 25
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "  ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 29
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "aa",
                    "value": "aa",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 31
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "(",
                    "value": "(",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 33
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "col1",
                    "value": "col1",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 34
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ")",
                    "value": ")",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 38
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 39
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "AS",
                    "value": "AS",
                    "keyword": "AS",
                    "type": 1,
                    "flags": 3,
                    "position": 40
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 42
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "(",
                    "value": "(",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 43
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 44
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "SELECT",
                    "value": "SELECT",
                    "keyword": "SELECT",
                    "type": 1,
                    "flags": 3,
                    "position": 45
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 51
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "1",
                    "value": 1,
                    "keyword": null,
                    "type": 6,
                    "flags": 0,
                    "position": 52
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 53
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "UNION ALL",
                    "value": "UNION ALL",
                    "keyword": "UNION ALL",
                    "type": 1,
                    "flags": 7,
                    "position": 54
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 63
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "SELECT",
                    "value": "SELECT",
                    "keyword": "SELECT",
                    "type": 1,
                    "flags": 3,
                    "position": 64
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 70
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "2",
                    "value": 2,
                    "keyword": null,
                    "type": 6,
                    "flags": 0,
                    "position": 71
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 72
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ")",
                    "value": ")",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 73
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 74
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "SELECT",
                    "value": "SELECT",
                    "keyword": "SELECT",
                    "type": 1,
                    "flags": 3,
                    "position": 75
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 81
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "col1",
                    "value": "col1",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 82
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 86
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "FROM",
                    "value": "FROM",
                    "keyword": "FROM",
                    "type": 1,
                    "flags": 3,
                    "position": 87
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 91
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "cte",
                    "value": "cte",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 92
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": null,
                    "value": null,
                    "keyword": null,
                    "type": 9,
                    "flags": 0,
                    "position": null
                }
            ],
            "count": 39,
            "idx": 39
        },
        "delimiter": ";",
        "delimiterLen": 1,
        "strict": false,
        "errors": []
    },
    "parser": {
        "@type": "PhpMyAdmin\\SqlParser\\Parser",
        "list": {
            "@type": "@1"
        },
        "statements": [
            {
                "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement",
                "name": {
                    "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression",
                    "database": null,
                    "table": "view_name",
                    "column": null,
                    "expr": "view_name",
                    "alias": null,
                    "function": null,
                    "subquery": null
                },
                "entityOptions": null,
                "fields": null,
                "with": {
                    "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement",
                    "withers": {
                        "aa": {
                            "@type": "PhpMyAdmin\\SqlParser\\Components\\WithKeyword",
                            "name": "aa",
                            "columns": [
                                {
                                    "@type": "PhpMyAdmin\\SqlParser\\Components\\ArrayObj",
                                    "raw": [
                                        "col1"
                                    ],
                                    "values": [
                                        "col1"
                                    ]
                                }
                            ],
                            "statement": {
                                "@type": "PhpMyAdmin\\SqlParser\\Parser",
                                "list": {
                                    "@type": "PhpMyAdmin\\SqlParser\\TokensList",
                                    "tokens": [
                                        {
                                            "@type": "@20"
                                        },
                                        {
                                            "@type": "@21"
                                        },
                                        {
                                            "@type": "@22"
                                        },
                                        {
                                            "@type": "@23"
                                        },
                                        {
                                            "@type": "@24"
                                        },
                                        {
                                            "@type": "@25"
                                        },
                                        {
                                            "@type": "@26"
                                        },
                                        {
                                            "@type": "@27"
                                        },
                                        {
                                            "@type": "@28"
                                        },
                                        {
                                            "@type": "@29"
                                        },
                                        {
                                            "@type": "@30"
                                        }
                                    ],
                                    "count": 11,
                                    "idx": 11
                                },
                                "statements": [
                                    {
                                        "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement",
                                        "expr": [
                                            {
                                                "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression",
                                                "database": null,
                                                "table": null,
                                                "column": null,
                                                "expr": "1",
                                                "alias": null,
                                                "function": null,
                                                "subquery": null
                                            }
                                        ],
                                        "from": [],
                                        "index_hints": null,
                                        "partition": null,
                                        "where": null,
                                        "group": null,
                                        "group_options": null,
                                        "having": null,
                                        "order": null,
                                        "limit": null,
                                        "procedure": null,
                                        "into": null,
                                        "join": null,
                                        "union": [
                                            [
                                                "UNION ALL",
                                                {
                                                    "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement",
                                                    "expr": [
                                                        {
                                                            "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression",
                                                            "database": null,
                                                            "table": null,
                                                            "column": null,
                                                            "expr": "2",
                                                            "alias": null,
                                                            "function": null,
                                                            "subquery": null
                                                        }
                                                    ],
                                                    "from": [],
                                                    "index_hints": null,
                                                    "partition": null,
                                                    "where": null,
                                                    "group": null,
                                                    "group_options": null,
                                                    "having": null,
                                                    "order": [],
                                                    "limit": null,
                                                    "procedure": null,
                                                    "into": null,
                                                    "join": null,
                                                    "union": [],
                                                    "end_options": null,
                                                    "options": {
                                                        "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray",
                                                        "options": []
                                                    },
                                                    "first": 5,
                                                    "last": 10
                                                }
                                            ]
                                        ],
                                        "end_options": null,
                                        "options": {
                                            "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray",
                                            "options": []
                                        },
                                        "first": 0,
                                        "last": 10
                                    }
                                ],
                                "brackets": 0,
                                "strict": false,
                                "errors": []
                            }
                        }
                    },
                    "cteStatementParser": {
                        "@type": "PhpMyAdmin\\SqlParser\\Parser",
                        "list": {
                            "@type": "PhpMyAdmin\\SqlParser\\TokensList",
                            "tokens": [
                                {
                                    "@type": "@33"
                                },
                                {
                                    "@type": "@34"
                                },
                                {
                                    "@type": "@35"
                                },
                                {
                                    "@type": "@36"
                                },
                                {
                                    "@type": "@37"
                                },
                                {
                                    "@type": "@38"
                                },
                                {
                                    "@type": "@39"
                                },
                                {
                                    "@type": "@40"
                                }
                            ],
                            "count": 8,
                            "idx": 8
                        },
                        "statements": [
                            {
                                "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement",
                                "expr": [
                                    {
                                        "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression",
                                        "database": null,
                                        "table": null,
                                        "column": "col1",
                                        "expr": "col1",
                                        "alias": null,
                                        "function": null,
                                        "subquery": null
                                    }
                                ],
                                "from": [
                                    {
                                        "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression",
                                        "database": null,
                                        "table": "cte",
                                        "column": null,
                                        "expr": "cte",
                                        "alias": null,
                                        "function": null,
                                        "subquery": null
                                    }
                                ],
                                "index_hints": null,
                                "partition": null,
                                "where": null,
                                "group": null,
                                "group_options": null,
                                "having": null,
                                "order": null,
                                "limit": null,
                                "procedure": null,
                                "into": null,
                                "join": null,
                                "union": [],
                                "end_options": null,
                                "options": {
                                    "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray",
                                    "options": []
                                },
                                "first": 0,
                                "last": 6
                            }
                        ],
                        "brackets": 0,
                        "strict": false,
                        "errors": []
                    },
                    "options": {
                        "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray",
                        "options": []
                    },
                    "first": null,
                    "last": null
                },
                "select": null,
                "like": null,
                "partitionBy": null,
                "partitionsNum": null,
                "subpartitionBy": null,
                "subpartitionsNum": null,
                "partitions": null,
                "table": null,
                "return": null,
                "parameters": null,
                "body": [
                    {
                        "@type": "@39"
                    }
                ],
                "options": {
                    "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray",
                    "options": {
                        "6": "view"
                    }
                },
                "first": 0,
                "last": 38
            }
        ],
        "brackets": 0,
        "strict": false,
        "errors": []
    },
    "errors": {
        "lexer": [],
        "parser": []
    }
}