In this blog post, let’s learn about the error message “321 Cannot group by aggregate column.” in Hydra and the description of the error.
Error Message
321 Cannot group by aggregate column.
Error Details
The GROUP BY clause in this statement refers to a selected value that is an aggregate function. This action is not supported. (It does not make sense to group rows using a value that cannot be computed until the group has been formed.) You can group rows by the value of columns or expressions on columns, but the expressions cannot include aggregate functions. Review the GROUP BY clause, and compare it to the select list. Possibly one of the column numbers in the GROUP BY clause is incorrect.
Leave a Reply