How To Write The Aggragation In Mongodb

[Solved] How To Write The Aggragation In Mongodb | Perl - Code Explorer | yomemimo.com
Question : how to write the aggragation in mongodb

Answered by : lovely-lapwing-j7d5miaxkeu2

> db.mycol.aggregate([{$group : {_id : "$by_user", num_tutorial : {$sum : 1}}}])
{ "_id" : "tutorials point", "num_tutorial" : 2 }
{ "_id" : "Neo4j", "num_tutorial" : 1 }
>

Source : https://www.tutorialspoint.com/mongodb/mongodb_aggregation.htm | Last Update : Thu, 24 Dec 20

Answers related to how to write the aggragation in mongodb

Code Explorer Popular Question For Perl