setGrouping(group) - JDO Query's method

Method
javax.jdo.Query
void setGrouping(
  String group
)

Set the grouping expressions, optionally including a "having" clause. When grouping is specified, each result expression must either be an expression contained in the grouping, or an aggregate evaluated once per group.
Parameters:
group - a comma-delimited list of expressions, optionally followed by the "having" keyword and a boolean expression
Since:
JDO 2.0