{
    "query": "WITH cte (col1) AS ( SELECT 1 UNION ALL SELECT 2 ) SELECT * FROM cte INNER JOIN table2 ON table2.col1=cte.col1;",
    "lexer": {
        "@type": "PhpMyAdmin\\SqlParser\\Lexer",
        "str": "WITH cte (col1) AS ( SELECT 1 UNION ALL SELECT 2 ) SELECT * FROM cte INNER JOIN table2 ON table2.col1=cte.col1;",
        "len": 111,
        "last": 111,
        "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": "*",
                    "value": "*",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 58
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 59
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "FROM",
                    "value": "FROM",
                    "keyword": "FROM",
                    "type": 1,
                    "flags": 3,
                    "position": 60
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 64
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "cte",
                    "value": "cte",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 65
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 68
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "INNER JOIN",
                    "value": "INNER JOIN",
                    "keyword": "INNER JOIN",
                    "type": 1,
                    "flags": 7,
                    "position": 69
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 79
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "table2",
                    "value": "table2",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 80
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 86
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "ON",
                    "value": "ON",
                    "keyword": "ON",
                    "type": 1,
                    "flags": 3,
                    "position": 87
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 89
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "table2",
                    "value": "table2",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 90
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ".",
                    "value": ".",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 96
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "col1",
                    "value": "col1",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 97
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "=",
                    "value": "=",
                    "keyword": null,
                    "type": 2,
                    "flags": 2,
                    "position": 101
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "cte",
                    "value": "cte",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 102
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ".",
                    "value": ".",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 105
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "col1",
                    "value": "col1",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 106
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ";",
                    "value": ";",
                    "keyword": null,
                    "type": 9,
                    "flags": 0,
                    "position": 110
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": null,
                    "value": null,
                    "keyword": null,
                    "type": 9,
                    "flags": 0,
                    "position": null
                }
            ],
            "count": 47,
            "idx": 47
        },
        "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": {
                    "@type": "PhpMyAdmin\\SqlParser\\Parser",
                    "list": {
                        "@type": "PhpMyAdmin\\SqlParser\\TokensList",
                        "tokens": [
                            {
                                "@type": "@26"
                            },
                            {
                                "@type": "@27"
                            },
                            {
                                "@type": "@28"
                            },
                            {
                                "@type": "@29"
                            },
                            {
                                "@type": "@30"
                            },
                            {
                                "@type": "@31"
                            },
                            {
                                "@type": "@32"
                            },
                            {
                                "@type": "@33"
                            },
                            {
                                "@type": "@34"
                            },
                            {
                                "@type": "@35"
                            },
                            {
                                "@type": "@36"
                            },
                            {
                                "@type": "@37"
                            },
                            {
                                "@type": "@38"
                            },
                            {
                                "@type": "@39"
                            },
                            {
                                "@type": "@40"
                            },
                            {
                                "@type": "@41"
                            },
                            {
                                "@type": "@42"
                            },
                            {
                                "@type": "@43"
                            },
                            {
                                "@type": "@44"
                            },
                            {
                                "@type": "@45"
                            },
                            {
                                "@type": "@46"
                            },
                            {
                                "@type": "@47"
                            },
                            {
                                "@type": "@48"
                            }
                        ],
                        "count": 23,
                        "idx": 23
                    },
                    "statements": [
                        {
                            "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement",
                            "expr": [
                                {
                                    "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression",
                                    "database": null,
                                    "table": null,
                                    "column": null,
                                    "expr": "*",
                                    "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": [
                                {
                                    "@type": "PhpMyAdmin\\SqlParser\\Components\\JoinKeyword",
                                    "type": "INNER",
                                    "expr": {
                                        "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression",
                                        "database": null,
                                        "table": "table2",
                                        "column": null,
                                        "expr": "table2",
                                        "alias": null,
                                        "function": null,
                                        "subquery": null
                                    },
                                    "on": [
                                        {
                                            "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition",
                                            "identifiers": [
                                                "table2",
                                                "col1",
                                                "cte"
                                            ],
                                            "isOperator": false,
                                            "expr": "table2.col1=cte.col1"
                                        }
                                    ],
                                    "using": null
                                }
                            ],
                            "union": [],
                            "end_options": null,
                            "options": {
                                "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray",
                                "options": []
                            },
                            "first": 0,
                            "last": 20
                        }
                    ],
                    "brackets": 0,
                    "strict": false,
                    "errors": []
                },
                "options": {
                    "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray",
                    "options": []
                },
                "first": 0,
                "last": 45
            }
        ],
        "brackets": 0,
        "strict": false,
        "errors": []
    },
    "errors": {
        "lexer": [],
        "parser": []
    }
}