In this blog post, let’s learn about the error message “4008 A subquery 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
4008 A subquery is not allowed inside an aggregate function.
Reason for the Error
You specified a subquery within an aggregate function, which is not supported.
Solution
Correct the syntax and resubmit