ClickHouse count() accepts no arguments, so the column type must be AggregateFunction(count) not AggregateFunction(count, UInt64). The latter causes countMerge() to fail with ILLEGAL_TYPE_OF_ARGUMENT. Drop and recreate the table/MV to apply the corrected schema. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>