From NSFetchRequest:
/* Specifies the way in which data should be grouped before a select statement is run in an SQL database.
Values passed to propertiesToGroupBy must be NSPropertyDescriptions, NSExpressionDescriptions, or keypath strings; keypaths can not contain
any to-many steps.
If GROUP BY is used, then you must set the resultsType to NSDictionaryResultsType, and the SELECT values must be literals, aggregates,
or columns specified in the GROUP BY. Aggregates will operate on the groups specified in the GROUP BY rather than the whole table. /
@property (nullable, nonatomic, copy) NSArray propertiesToGroupBy NS_AVAILABLE(10_7, 5_0);
From NSFetchRequest: /* Specifies the way in which data should be grouped before a select statement is run in an SQL database. Values passed to propertiesToGroupBy must be NSPropertyDescriptions, NSExpressionDescriptions, or keypath strings; keypaths can not contain any to-many steps. If GROUP BY is used, then you must set the resultsType to NSDictionaryResultsType, and the SELECT values must be literals, aggregates, or columns specified in the GROUP BY. Aggregates will operate on the groups specified in the GROUP BY rather than the whole table. / @property (nullable, nonatomic, copy) NSArray propertiesToGroupBy NS_AVAILABLE(10_7, 5_0);