```
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
```

{
        std::string t, c;
        std::tie(t, c) = all_tables.getTable(column.first);
        column.second.name = std::make_pair(t, c);
        result[t + "." + c].merge(column.second);
    }
    std::set<TableAndColumn> visited;
    for (auto & column : result)
        if (!visited.count(column.second.name))
        {
            auto equal = connectedEqualityFind(
                result[column.second.name.first + "." + column.second.name.second],
                result,
                visited);
            for (const auto & c : equal)
                result[c.first + "." + c.second].equals = equal;
        }
    for (auto & column : result)
        for (const auto & e : column.second.equals)
            column.second.merge(result[e.first + "." + e.second]);
    for (auto & column : result)
    {
        column.second.unifyType();
        if (column.second.generateValues())
            for (const auto & e : column.second.equals)
                result[e.first + "." + e.second].merge(column.second);
    }
    return result;
}
std::vector<DB::ASTPtr> getSelect(DB::ASTPtr vertex)