MongoLink`
MongoLink`

MongoCollectionDistinct

MongoCollectionDistinct[MongoCollection[],f]

obtain a list of distinct values for the field in the collection.

MongoCollectionDistinct[MongoCollection[],field,query]

obtain a list of distinct values for the field for documents matching query.

更多信息和选项

范例

基本范例  (1)

Connect to a client:

Connect to a new "WolframTestDistinct" collection in the "WolframTestDB" database:

Find the list of distinct items in the "dept" field:

Find the list of distinct items in the "sku" subfield of the "item" field:

Find the list of distinct items in the "sku" subfield of the "item" field from the set of documents whose "dept" field has value "A":

Destroy the collection that was created:

Wolfram Research (2018),MongoCollectionDistinct,Wolfram 语言函数,https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionDistinct.html.

文本

Wolfram Research (2018),MongoCollectionDistinct,Wolfram 语言函数,https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionDistinct.html.

CMS

Wolfram 语言. 2018. "MongoCollectionDistinct." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionDistinct.html.

APA

Wolfram 语言. (2018). MongoCollectionDistinct. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionDistinct.html 年

BibTeX

@misc{reference.wolfram_2024_mongocollectiondistinct, author="Wolfram Research", title="{MongoCollectionDistinct}", year="2018", howpublished="\url{https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionDistinct.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_mongocollectiondistinct, organization={Wolfram Research}, title={MongoCollectionDistinct}, year={2018}, url={https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionDistinct.html}, note=[Accessed: 21-November-2024 ]}