Normally UnionModel can be grouped using a built-in method already. Even though the query seems fine, it produces the following error: error: "SQLSTATE[HY000]: General error: 1111 Invalid use of group function" (further reported in #8) It appears that generated SQL query is invalid containing: ``` sql sum(NULL) `due_net`, ``` Normally sum() must have an argument. The aggregation is defined: ``` php 'due_net'=>'sum([])', ``` And this is defined in a UnionModel: ``` php $this->addExpression('due_net', ['[total_net] * [pct]', 'type'=>'money']); ```
Normally UnionModel can be grouped using a built-in method already. Even though the query seems fine, it produces the following error:
error: "SQLSTATE[HY000]: General error: 1111 Invalid use of group function" (further reported in #8)
It appears that generated SQL query is invalid containing:
Normally sum() must have an argument. The aggregation is defined:
And this is defined in a UnionModel: