i want fetch request for below query
select name,count(1) from tablename groupedby name;
i tried to add grouped by fetch controller not succeed how to do that
i want fetch request for below query
select name,count(1) from tablename groupedby name;
i tried to add grouped by fetch controller not succeed how to do that
AFAIK, you can't have group by query in MR without FRC. So may be you need something like:
+ (NSFetchedResultsController *) MR_fetchAllSortedBy:(NSString *)sortTerm ascending:(BOOL)ascending withPredicate:(NSPredicate *)searchTerm groupBy:(NSString *)groupingKeyPath delegate:(id<NSFetchedResultsControllerDelegate>)delegate;
;
If you still need just query, you can take a look a this solution