The original query uses aggregate functions (such as COUNT, MAX, AVG). The statement cannot be generated automatically for ...