JZN-00369
column '~1s' cannot be used for operation '~2s'
Cause
An invalid column was used for a $group or $distinct operation. Constant columns, aggregation results, and non-scalar columns may not be used for $group or $distinct.
Action
Remove the column from the list of targets for the operation.