I have an entity with 2 attributes, an NSDate and a boolean value. (this is going to be a large “table”)
I need to count all YES and NO values for the boolean between two dates, grouped by days. How can i do this?
The result I'm looking for is
{
totalYes = 10,
totalNo = 5,
date = dd-mm-yyyy
},
{
totalYes = 15,
totalNo = 3,
date = dd-mm-yyyy
},
etc
Thanks
You can try this approach:
1)Get all the enteties with YES,sorted by date
2)Go trough this array and fill array with dictionaries with day value and number of yeses
3)Then, do the ame thing with noe’s,adding number of no to that array of dictionaries.