{
    "query": "WITH cte (col1) AS ( SELECT 1 UNION ALL SELECT 2 ) SELECT col1 FR cte",
    "lexer": {
        "@type": "PhpMyAdmin\\SqlParser\\Lexer",
        "str": "WITH cte (col1) AS ( SELECT 1 UNION ALL SELECT 2 ) SELECT col1 FR cte",
        "len": 69,
        "last": 69,
        "list": {
            "@type": "PhpMyAdmin\\SqlParser\\TokensList",
            "tokens": [
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "WITH",
                    "value": "WITH",
                    "keyword": "WITH",
                    "type": 1,
                    "flags": 3,
                    "position": 0
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 4
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "cte",
                    "value": "cte",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 5
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 8
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "(",
                    "value": "(",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 9
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "col1",
                    "value": "col1",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 10
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ")",
                    "value": ")",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 14
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 15
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "AS",
                    "value": "AS",
                    "keyword": "AS",
                    "type": 1,
                    "flags": 3,
                    "position": 16
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 18
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "(",
                    "value": "(",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 19
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 20
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "SELECT",
                    "value": "SELECT",
                    "keyword": "SELECT",
                    "type": 1,
                    "flags": 3,
                    "position": 21
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 27
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "1",
                    "value": 1,
                    "keyword": null,
                    "type": 6,
                    "flags": 0,
                    "position": 28
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 29
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "UNION ALL",
                    "value": "UNION ALL",
                    "keyword": "UNION ALL",
                    "type": 1,
                    "flags": 7,
                    "position": 30
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 39
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "SELECT",
                    "value": "SELECT",
                    "keyword": "SELECT",
                    "type": 1,
                    "flags": 3,
                    "position": 40
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 46
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "2",
                    "value": 2,
                    "keyword": null,
                    "type": 6,
                    "flags": 0,
                    "position": 47
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 48
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ")",
                    "value": ")",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 49
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 50
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "SELECT",
                    "value": "SELECT",
                    "keyword": "SELECT",
                    "type": 1,
                    "flags": 3,
                    "position": 51
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 57
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "col1",
                    "value": "col1",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 58
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 62
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "FR",
                    "value": "FR",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 63
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 65
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "cte",
                    "value": "cte",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 66
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": null,
                    "value": null,
                    "keyword": null,
                    "type": 9,
                    "flags": 0,
                    "position": null
                }
            ],
            "count": 32,
            "idx": 32
        },
        "delimiter": ";",
        "delimiterLen": 1,
        "strict": false,
        "errors": []
    },
    "parser": {
        "@type": "PhpMyAdmin\\SqlParser\\Parser",
        "list": {
            "@type": "@1"
        },
        "statements": [
            {
                "@type": "PhpMyAdmin\\SqlParser\\Statements\\WithStatement",
                "withers": {
                    "cte": {
                        "@type": "PhpMyAdmin\\SqlParser\\Components\\WithKeyword",
                        "name": "cte",
                        "columns": [
                            {
                                "@type": "PhpMyAdmin\\SqlParser\\Components\\ArrayObj",
                                "raw": [
                                    "col1"
                                ],
                                "values": [
                                    "col1"
                                ]
                            }
                        ],
                        "statement": {
                            "@type": "PhpMyAdmin\\SqlParser\\Parser",
                            "list": {
                                "@type": "PhpMyAdmin\\SqlParser\\TokensList",
                                "tokens": [
                                    {
                                        "@type": "@13"
                                    },
                                    {
                                        "@type": "@14"
                                    },
                                    {
                                        "@type": "@15"
                                    },
                                    {
                                        "@type": "@16"
                                    },
                                    {
                                        "@type": "@17"
                                    },
                                    {
                                        "@type": "@18"
                                    },
                                    {
                                        "@type": "@19"
                                    },
                                    {
                                        "@type": "@20"
                                    },
                                    {
                                        "@type": "@21"
                                    },
                                    {
                                        "@type": "@22"
                                    },
                                    {
                                        "@type": "@23"
                                    }
                                ],
                                "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": null,
                "options": {
                    "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray",
                    "options": []
                },
                "first": 0,
                "last": 23
            },
            {
                "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement",
                "expr": [
                    {
                        "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression",
                        "database": null,
                        "table": null,
                        "column": "col1",
                        "expr": "col1",
                        "alias": "FR",
                        "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": [],
                "end_options": null,
                "options": {
                    "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray",
                    "options": []
                },
                "first": 24,
                "last": 30
            }
        ],
        "brackets": 0,
        "strict": false,
        "errors": []
    },
    "errors": {
        "lexer": [],
        "parser": [
            [
                "An alias was previously found.",
                {
                    "@type": "@32"
                },
                0
            ],
            [
                "Unexpected token.",
                {
                    "@type": "@32"
                },
                0
            ],
            [
                "An alias was previously found.",
                {
                    "@type": "@32"
                },
                0
            ],
            [
                "Unexpected token.",
                {
                    "@type": "@32"
                },
                0
            ]
        ]
    }
}