HPE NonStop SQL/MX Error – 6001 DISTINCT aggregates can be computed for only one column per table expression.

In this blog post, let’s learn about the error message “6001 DISTINCT aggregates can be computed for only one column per table expression.” when working with HPE NonStop SQL/MX, the reason for the error and the solution to fix this error message.

Error Message

6001 DISTINCT aggregates can be computed for only one column per table expression.

Reason for the Error

You attempted to compute DISTINCT aggregates for more than one column.

Solution

Correct syntax and resubmit