X_AGGREGATE_UNSUPPORTED
Means
that column has no aggregate both drivers can answer alike
Typical cause
three conditions, one code, and the cause names which. A text column has no min/max the two drivers agree on — ordering is the database's collation in one and JS code-unit order in the other. avg over money is refused outright: the mean of an integer number of minor units is not one, so every answer would be a silent rounding. And a money sum past ±2^53 minor units has no JS number to hold it, and MoneyValue.minor is one
Fix
the fix names the exact call. For a wrong column, <entity>.<fn>('<candidate>') — the cause lists the columns that fn accepts, or says the entity declares none. For avg over money, <entity>.sum(col) and <entity>.count(), dividing at the call site where the rounding is a decision somebody made. For the overflow, narrow the rows with .andWhere(…)