

such as
```
create view view1 as 
with t as (select number n from numbers(3))
select n from t
```
{
    if (auto * node_select = ast->as<ASTSelectQuery>())
    {
        std::optional<Data> new_data;
        if (auto with = node_select->with())
        {
            for (auto & child : with->children)
            {
                visit(child, new_data ? *new_data : data);
                if (auto * ast_with_elem = child->as<ASTWithElement>())
                {
                    if (!new_data)
                        new_data = data;
                    new_data->subqueries[ast_with_elem->name] = ast_with_elem->subquery;
                }
            }
        }
        for (auto & child : node_select->children)
        {
            if (child != node_select->with())
                visit(child, new_data ? *new_data : data);
        }
    }
    else
    {
        for (auto & child : ast->children)