“MongoDB Aggregate Count” Ответ

MongoDB Aggregate Count

#return the number of documents whose "field" field has a value of A 
query = db.collection.aggregate([{
          "$match": {
            "field": "A"
          }
        },{
          "$count": "number of occurrences"
}])
Annoyed Antelope

Монго подсчет

db.collection.countDocuments( <query>, <options> )
Elegant Eland

Ответы похожие на “MongoDB Aggregate Count”

Вопросы похожие на “MongoDB Aggregate Count”

Больше похожих ответов на “MongoDB Aggregate Count” по Python

Смотреть популярные ответы по языку

Смотреть другие языки программирования