开发者

Objective C: CoreData and aggregation

Given a CoreData-Entity with an date (days) and an ammount called Transaction. Is it with CoreData possible (and how) to aggregate/group the 'table' (with all Transactions) by Date and calculate the sum of the day in a second column/attribute? (the SQL-Solution would be SELE开发者_如何学运维CT date, sum(ammount) FROM transaction GROUP BY date)


They may not do exactly what you want, but since Core Data is fully KVC compliant, take a look at the Key-Value Coding Set and Array operators. This should at least get you pretty close to what you're looking to do.


Stack Overflow: "CoreData equivalent of sum…group by"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜