This statement uses an aggregate function, such as COUNT, SUM, MIN, MAX, or AVG, but applies it to a column that has the BYTE or TEXT data type. This action is not supported.
Review the use of each aggregate function to make sure that it is not applied to a BYTE or TEXT column.