i'm quite new to parse queries, so I would appreciate if you could give me some help.
I have a database like this:
ID - NAME - HOUR
07 - AAAA - 09:07
07 - AAAA - 09:15
08 - AAAA - 09:08
08 - AAAA - 09:09
09 - AAAA - 07:00
I need a query that return to me this:
ID - NAME - HOUR
07 - AAAA - 09:15
08 - AAAA - 09:09
09 - AAAA - 07:00
I'm already able to get the lastest hour for a determinated name, but when i put the ID, I got lost.
Thanks.
The answer is unfortunately you CANNOT "group" or "unique" with Parse.com.
Standard procedure with Parse:
Simply get all items for "AAAA"
Sort by both ID then backwards by HOUR.
In your app, simply loop through and take only the first of each ID, dispose of other equal IDs.
(This is extremely easy to do in most environments, like Swift say.)
Unfortunately this is exactly what you have to do with Parse, for what you're trying to achieve.
(Myself - I don't even bother with the sort from Parse, I just get all "AAAA". And I trivially sort and select on the app side.)