The Expression engine (SQL) doesn’t allow to mix aggregate fields with non-aggregate fields, as it results in undefined behaviour.

Example :

Expression = SUM(ValueField_A) + ValueField_B

ValueField_A is inside an aggregation expression (SUM) and ValueField_B is not.

This results in an error :

The following expression(s) contain(s) non aggregate field references and aggregate functions at the same time which is not allowed

To solve this, think about the calculation you really want to do, and what will happen when it will be included in a GROUP BY operation.

see also

Aggregated Expressions

Last modified: Apr 29, 2019

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment