Extended $lookup

I got lost spinning around in the previous thread, sorry.

That’s what I wanted to know: I can’t substitute db.collection.distinct() for distinct, right?

Well, I might tell the DBA about updating the server to 5.0 or even including group in sensorsData, but I guess we have a devices collection for some reason.