```
milovidov@milovidov-desktop:~/work/ClickHouse$ build/utils/db-generator/query_db_generator 
^C
milovidov@milovidov-desktop:~/work/ClickHouse$ build/utils/db-generator/query_db_generator --help
^C
milovidov@milovidov-desktop:~/work/ClickHouse$ build/utils/db-generator/query_db_generator < query.sql 
milovidov@milovidov-desktop:~/work/ClickHouse$ build/utils/db-generator/query_db_generator query.sql 
^C
```

{
    DB::ParserQueryWithOutput parser;
    TableList result;
    for (std::string & query : queries)
    {
        DB::ASTPtr ast = parseQuery(parser, query.data(), query.data() + query.size(), "", 0, 0);
        for (auto & select : getSelect(ast))
        {
            TableList local;
            parseSelectQuery(select, local);
            result.merge(local);
        }
    }
    return result;
}
int main(int, char **)
{
    handlers["plus"] = arithmeticFunc;
    handlers["minus"] = arithmeticFunc;
    handlers["like"] = likeFunc;
    handlers["array"] = arrayFunc;
    handlers["in"] = inFunc;
    handlers[""] = simpleFunc;
    std::vector<std::string> queries;
    std::string in;