HPE NonStop SQL/MX Error – 4005 Column reference name must be a grouping column or be specified within an aggregate.

In this blog post, let’s learn about the error message “4005 Column reference name must be a grouping column or be specified within an aggregate.” when working with HPE NonStop SQL/MX, the reason for the error and the solution to fix this error message.

Error Message

4005 Column reference name must be a grouping column or be specified within an aggregate.

Reason for the Error

You referenced column name, which is not a grouping column or is not specified within an aggregate, which is not supported.

Solution

Correct the column reference and resubmit