HPE NonStop SQL/MX Error – 4009 An aggregate is not allowed inside an aggregate function.

In this blog post, let’s learn about the error message “4009 An aggregate is not allowed inside an aggregate function.” when working with HPE NonStop SQL/MX, the reason for the error and the solution to fix this error message.

Error Message

4009 An aggregate is not allowed inside an aggregate function.

Reason for the Error

You specified an aggregate inside an aggregate function.

Solution

Correct the syntax and resubmit