Clickhouse Version: 21.10.2.15 

After a quick test, I couldn't make a function using a query as a statement

**Use case**

It is useful to have some prepared queries that could work as functions

**Describe the solution you'd like**

```sql
CREATE FUNCTION plus_tutu as () -> ((select `orderYM` from `bucket_18`.`flattable` limit 1))
```

{
    FunctionNameNormalizer().visit(query_ptr.get());
    ASTCreateFunctionQuery & create_function_query = query_ptr->as<ASTCreateFunctionQuery &>();
    AccessRightsElements access_rights_elements;
    access_rights_elements.emplace_back(AccessType::CREATE_FUNCTION);
    if (create_function_query.or_replace)
        access_rights_elements.emplace_back(AccessType::DROP_FUNCTION);
    if (!create_function_query.cluster.empty())
        return executeDDLQueryOnCluster(query_ptr, getContext(), access_rights_elements);
    auto current_context = getContext();
    current_context->checkAccess(access_rights_elements);
    auto & user_defined_function_factory = UserDefinedSQLFunctionFactory::instance();
    auto & function_name = create_function_query.function_name;
    bool if_not_exists = create_function_query.if_not_exists;
    bool replace = create_function_query.or_replace;
    create_function_query.if_not_exists = false;
    create_function_query.or_replace = false;
    validateFunction(create_function_query.function_core, function_name);
    user_defined_function_factory.registerFunction(current_context, function_name, query_ptr, replace, if_not_exists, persist_function);
    return {};
}
void InterpreterCreateFunctionQuery::validateFunction(ASTPtr function, const String & name)