问题
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"
}
回答1:
Azure DocumentDB currently does not support DISTINCT
.
Please voice your opinion and vote for this feature on DocumentDB's feedback forum.
来源:https://stackoverflow.com/questions/26928950/how-to-query-azure-documentdb-with-an-equivalent-of-the-select-distinct-statemen