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

auto join_columns = getIndent(jch->on_expression);
                columns.insert(join_columns.begin(), join_columns.end());
            }
        }
    }
    std::set<std::string> column_aliases;
    auto select_columns = getSelectIndent(select_ast->select(), column_aliases);
    columns.insert(select_columns.begin(), select_columns.end());
    auto where_columns = getIndent(select_ast->where());
    columns.insert(where_columns.begin(), where_columns.end());
    auto groupby_columns = getIndent(select_ast->groupBy());
    columns.insert(groupby_columns.begin(), groupby_columns.end());
    auto orderby_columns = getIndent(select_ast->orderBy());
    columns.insert(orderby_columns.begin(), orderby_columns.end());
    auto having_columns = getIndent(select_ast->having());
    columns.insert(having_columns.begin(), having_columns.end());
    std::map<std::string, Column> columns_descriptions;
    processFunc(ast, columns_descriptions);
    for (const auto & column : columns)
        if (!column_aliases.count(column))
        {
            if (!columns_descriptions.count(column))
                columns_descriptions[column] = Column(column);
            all_tables.addColumn(column);
        }
    columns_descriptions = unificateColumns(columns_descriptions, all_tables);
    for (auto & column : columns_descriptions)
        all_tables.addDescription(column.second);
}
TableList getTablesFromSelect(std::vector<std::string> queries)