[Description]
cannot use DISTINCT with WITHIN GROUP.The order clause for WITHIN GROUP and the one for plain-aggregate ORDER BY share a field, so we have to check here that at most one is present. We also check for DISTINCT here to give a better error location.
[System Processing]
Processing will be aborted.
[Action]
To investigate the cause of the occurrence from the message, and remove cause.