Azure、DocumentDB,如何使用 JOIN return 独特的结果

Azure, DocumentDB, How to return unique results with JOIN

这是查询:

SELECT c.UserId, c.id, c.Items FROM c JOIN items IN c.Items

当然我会为他的每个项目取回同一个用户的对象。

我可以分组或缩小多个结果吗?

此功能正在根据 this, but it's not yet implemented. In the mean time, you can do this client side, in a collection using your own stored procedure or use the documentdb-lumenize 存储过程来实现。