It was discussed in the Java group , and is also used to implement iOS.
November 2014
GROUP BY is interesting only in combination with some kind of aggregate function. We have the most common RealmResults, such as sum (), average (), max () and min (), are what you are looking for or do you have something else in mind?
We actually implemented DISTINCT, but found some bugs that had to be fixed before it was released. I hope very soon :)
A separate operation is not yet available, but there is an easy workaround .
October 2015
DISTINCT has made significant progress, but has not yet been fully implemented and has not been so exposed either in Java or in any other. We are working on it and will report here as soon as we have something to experience.
As for the examples, the official docs have one:
The aggregate expressions @count, @min, @max, @sum and @avg are supported by the RLMArray properties, for example,
[Company objectsWhere:@" employees.@count > 5"] to find all companies with more than five employees.
Zanon
source share