GROUP BY in queries

1,018 views
Skip to first unread message

skunkwerk

unread,
Nov 25, 2014, 1:13:30 AM11/25/14
to realm...@googlegroups.com
Hi,
    Is there any way to do SQL "GROUP BY" queries in Realm?  Or maybe a "SELECT DISTINCT"?

regards,
imran

Christian Melchior

unread,
Nov 25, 2014, 3:10:04 AM11/25/14
to Skunkwerk, realm...@googlegroups.com
Hi Imran

GROUP BY is only interesting in combination with some kind of aggregate function. We have the most common ones directly on RealmResults, like sum(), average(), max() and min(), are these what you are looking for or do you have something else in mind?

We actually implemented DISTINCT but found some bugs that needed to be fixed before it can be released. So hopefully really soon :)

Cheers.

--
Christian Melchior
Senior Android Developer


--
You received this message because you are subscribed to the Google Groups "Realm Java" group.
To unsubscribe from this group and stop receiving emails from it, send an email to realm-java+...@googlegroups.com.
To post to this group, send email to realm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/realm-java/61babc0c-fb7d-43cd-848f-23ea701bf7b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



{#HS:56890174-47#}

skunkwerk

unread,
Nov 25, 2014, 11:47:09 PM11/25/14
to realm...@googlegroups.com, skun...@gmail.com, he...@realm.io
Hey Christian,

I think a DISTINCT would get me what I'm after.

thanks for the support,
imran

Rajat Deshpande

unread,
Oct 6, 2015, 4:06:24 PM10/6/15
to Realm Java, skun...@gmail.com, he...@realm.io
Did DISTINCT support get added?

Marius Rackwitz

unread,
Oct 7, 2015, 11:12:00 AM10/7/15
to Rajat Deshpande, realm...@googlegroups.com, skun...@gmail.com
Hi Rajat,

DISTINCT made progress in core, but isn't yet fully implemented and wasn't so exposed yet neither in the Java binding nor in any other.
We're working on that and will make sure to report back here once we have something to test out.

--
Marius Rackwitz
iOS Product Engineer



On Tue, Oct 6, 2015 at 8:06 PM UTC, Rajat Deshpande <rajatde...@gmail.com> wrote:
Did DISTINCT support get added?



{#HS:128259473-1994#}
Reply all
Reply to author
Forward
0 new messages