```
DROP TABLE IF EXISTS foo;

CREATE TABLE foo (timestamp DateTime, x UInt64)
ENGINE = MergeTree PARTITION BY toYYYYMMDD(timestamp)
ORDER BY (timestamp);

INSERT INTO foo (timestamp, x) SELECT toDateTime('2020-01-01 00:05:00'), number from system.numbers_mt LIMIT 100;

SELECT count() FROM system.mutations; -- ok

ALTER TABLE foo UPDATE x = 1 WHERE x = (SELECT x from foo WHERE x = 1);

SELECT count() FROM system.mutations; -- stuck

```
{
    auto func_base = makeASTFunction("sumCount", std::make_shared<ASTIdentifier>(column_name));
    auto exp_list = std::make_shared<ASTExpressionList>();
    if (func.name == "sum" || func.name == "count")
    {
        
        UInt8 idx = (func.name == "sum" ? 1 : 2);
        func.name = "tupleElement";
        exp_list->children.push_back(func_base);
        exp_list->children.push_back(std::make_shared<ASTLiteral>(idx));
    }
    else
    {
        
        auto new_arg1 = makeASTFunction("tupleElement", func_base, std::make_shared<ASTLiteral>(UInt8(1)));
        auto new_arg2 = makeASTFunction("tupleElement", func_base, std::make_shared<ASTLiteral>(UInt8(2)));
        func.name = "divide";
        exp_list->children.push_back(new_arg1);
        exp_list->children.push_back(new_arg2);
    }
    func.arguments = exp_list;
    func.children.push_back(func.arguments);
}
void fuseSumCountAggregates(std::unordered_map<String, FuseSumCountAggregates> & fuse_map)