{
    "query": "SELECT c1, c2, c3\n   /* Subquery in FROM list */\n   FROM (SELECT C1, c2, c3 FROM test2) t1\n   WHERE RIGHT(name, 2) = 'AB';\n",
    "lexer": {
        "@type": "PhpMyAdmin\\SqlParser\\Lexer",
        "str": "SELECT c1, c2, c3\n   /* Subquery in FROM list */\n   FROM (SELECT C1, c2, c3 FROM test2) t1\n   WHERE RIGHT(name, 2) = 'AB';\n",
        "len": 123,
        "last": 123,
        "list": {
            "@type": "PhpMyAdmin\\SqlParser\\TokensList",
            "tokens": [
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "SELECT",
                    "value": "SELECT",
                    "keyword": "SELECT",
                    "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": "c1",
                    "value": "c1",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 7
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ",",
                    "value": ",",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 9
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 10
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "c2",
                    "value": "c2",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 11
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ",",
                    "value": ",",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 13
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 14
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "c3",
                    "value": "c3",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 15
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "\n   ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 17
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "/* Subquery in FROM list */",
                    "value": "/* Subquery in FROM list */",
                    "keyword": null,
                    "type": 4,
                    "flags": 2,
                    "position": 21
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "\n   ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 48
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "FROM",
                    "value": "FROM",
                    "keyword": "FROM",
                    "type": 1,
                    "flags": 3,
                    "position": 52
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 56
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "(",
                    "value": "(",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 57
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "SELECT",
                    "value": "SELECT",
                    "keyword": "SELECT",
                    "type": 1,
                    "flags": 3,
                    "position": 58
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 64
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "C1",
                    "value": "C1",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 65
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ",",
                    "value": ",",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 67
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 68
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "c2",
                    "value": "c2",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 69
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ",",
                    "value": ",",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 71
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 72
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "c3",
                    "value": "c3",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 73
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 75
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "FROM",
                    "value": "FROM",
                    "keyword": "FROM",
                    "type": 1,
                    "flags": 3,
                    "position": 76
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 80
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "test2",
                    "value": "test2",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 81
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ")",
                    "value": ")",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 86
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 87
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "t1",
                    "value": "t1",
                    "keyword": null,
                    "type": 0,
                    "flags": 0,
                    "position": 88
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "\n   ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 90
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "WHERE",
                    "value": "WHERE",
                    "keyword": "WHERE",
                    "type": 1,
                    "flags": 3,
                    "position": 94
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 99
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "RIGHT",
                    "value": "RIGHT",
                    "keyword": "RIGHT",
                    "type": 1,
                    "flags": 35,
                    "position": 100
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "(",
                    "value": "(",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 105
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "name",
                    "value": "name",
                    "keyword": "NAME",
                    "type": 1,
                    "flags": 1,
                    "position": 106
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ",",
                    "value": ",",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 110
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 111
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "2",
                    "value": 2,
                    "keyword": null,
                    "type": 6,
                    "flags": 0,
                    "position": 112
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ")",
                    "value": ")",
                    "keyword": null,
                    "type": 2,
                    "flags": 16,
                    "position": 113
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 114
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "=",
                    "value": "=",
                    "keyword": null,
                    "type": 2,
                    "flags": 2,
                    "position": 115
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": " ",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 116
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "'AB'",
                    "value": "AB",
                    "keyword": null,
                    "type": 7,
                    "flags": 1,
                    "position": 117
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": ";",
                    "value": ";",
                    "keyword": null,
                    "type": 9,
                    "flags": 0,
                    "position": 121
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": "\n",
                    "value": " ",
                    "keyword": null,
                    "type": 3,
                    "flags": 0,
                    "position": 122
                },
                {
                    "@type": "PhpMyAdmin\\SqlParser\\Token",
                    "token": null,
                    "value": null,
                    "keyword": null,
                    "type": 9,
                    "flags": 0,
                    "position": null
                }
            ],
            "count": 48,
            "idx": 48
        },
        "delimiter": ";",
        "delimiterLen": 1,
        "strict": false,
        "errors": []
    },
    "parser": {
        "@type": "PhpMyAdmin\\SqlParser\\Parser",
        "list": {
            "@type": "@1"
        },
        "statements": [
            {
                "@type": "PhpMyAdmin\\SqlParser\\Statements\\SelectStatement",
                "expr": [
                    {
                        "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression",
                        "database": null,
                        "table": null,
                        "column": "c1",
                        "expr": "c1",
                        "alias": null,
                        "function": null,
                        "subquery": null
                    },
                    {
                        "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression",
                        "database": null,
                        "table": null,
                        "column": "c2",
                        "expr": "c2",
                        "alias": null,
                        "function": null,
                        "subquery": null
                    },
                    {
                        "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression",
                        "database": null,
                        "table": null,
                        "column": "c3",
                        "expr": "c3",
                        "alias": null,
                        "function": null,
                        "subquery": null
                    }
                ],
                "from": [
                    {
                        "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression",
                        "database": null,
                        "table": null,
                        "column": null,
                        "expr": "(SELECT C1, c2, c3 FROM test2)",
                        "alias": "t1",
                        "function": null,
                        "subquery": "SELECT"
                    }
                ],
                "index_hints": null,
                "partition": null,
                "where": [
                    {
                        "@type": "PhpMyAdmin\\SqlParser\\Components\\Condition",
                        "identifiers": [
                            "name",
                            "AB"
                        ],
                        "isOperator": false,
                        "expr": "RIGHT(name, 2) = 'AB'"
                    }
                ],
                "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": 44
            }
        ],
        "brackets": 0,
        "strict": false,
        "errors": []
    },
    "errors": {
        "lexer": [],
        "parser": []
    }
}