如何使用等效的SELECT DISTINCT语句查询Azure DocumentDB [英] How to query Azure DocumentDB with an equivalent of the SELECT DISTINCT statement

查看:135
本文介绍了如何使用等效的SELECT DISTINCT语句查询Azure DocumentDB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

DocumentDb不支持DISTINCT语句.我在DocumentDB中有以下结构的文档(成千上万个文档):

DocumentDb don't support the DISTINCT statement. I have documents in DocumentDB with the following structure (thousands of documents):

{
    "type" : "type1",
    "data" : {
        ...
    }
},{
    "type" : "type2",
    "data" : {
        ...
    }
},{
    "type" : "type2",
    "data" : {
        ...
    }
},{
    "type" : "type2",
    "data" : {
        ...
    }
}

如何查询集合并获得以下结果:

How can I query the collection and get the following result:

{
    "type" : "type1"
},{
    "type" : "type2"
}

推荐答案

Azure DocumentDB当前不支持DISTINCT.

Azure DocumentDB currently does not support DISTINCT.

请在 DocumentDB的反馈论坛.

这篇关于如何使用等效的SELECT DISTINCT语句查询Azure DocumentDB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆