

such as
```
create view view1 as 
with t as (select number n from numbers(3))
select n from t
```
{
    
    if (internal)
        return {};
    AccessRightsElements required_access;
    const auto & create = query_ptr->as<const ASTCreateQuery &>();
    if (create.table.empty())
    {
        required_access.emplace_back(AccessType::CREATE_DATABASE, create.database);
    }
    else if (create.is_dictionary)
    {
        required_access.emplace_back(AccessType::CREATE_DICTIONARY, create.database, create.table);
    }
    else if (create.isView())
    {
        assert(!create.temporary);
        if (create.replace_view)
            required_access.emplace_back(AccessType::DROP_VIEW | AccessType::CREATE_VIEW, create.database, create.table);
        else
            required_access.emplace_back(AccessType::CREATE_VIEW, create.database, create.table);
    }
    else
    {
        if (create.temporary)