**Describe the unexpected behaviour**
Not found column number in block error when specifying ORDER BY that uses a column not mentioned in the SELECT.

**How to reproduce**
```
:) select count() over (order by number + 1) from numbers(10) order by number

Code: 10. DB::Exception: Received from localhost:9000. DB::Exception: Not found column number in block. There are only columns: count() OVER (ORDER BY number + 1 ASC), plus(number, 1)
```

**Expected behavior**
It should work.

for (const auto & ast : asts)
        {
            for (const auto & ast_element : ast->children)
            {
                step.addRequiredOutput(ast_element->getColumnName());
                getRootActions(ast_element, only_types, step.actions());
            }
        }
    }
    else
    {
        for (const auto & ast : asts)
        {
            step.addRequiredOutput(ast->getColumnName());
            getRootActions(ast, only_types, step.actions());
        }
    }
    if (optimize_aggregation_in_order)
    {
        for (auto & child : asts)
        {
            auto actions_dag = std::make_shared<ActionsDAG>(columns_after_join);
            getRootActions(child, only_types, actions_dag);
            group_by_elements_actions.emplace_back(
                std::make_shared<ExpressionActions>(actions_dag, ExpressionActionsSettings::fromContext(getContext(), CompileExpressions::yes)));
        }
    }
    return true;
}
void SelectQueryExpressionAnalyzer::appendAggregateFunctionsArguments(ExpressionActionsChain & chain, bool only_types)