Use a GROUP BY to specify properties or expressions on which to group the results.

If the group by contains an expression, the expression must be in the SELECT clause as well. GROUP BY does not support aggregation or windows expressions. GROUP BY references must be property names; alias cannot be used.