The MongoDB Aggregation Framework provides a means to reshape and aggregate data in MongoDB 2.2+.
Suppose you have the following documents in my collection: { "_id":ObjectId("562e7c594c12942f08fe4192"), "shapes":[ { "shape":"square", "color":"…
mongodb mongodb-query aggregation-framework projectionHow can I (in MongoDB) combine data from multiple collections into one collection? Can I use map-reduce and if so …
mongodb mongodb-query aggregation-frameworkI am playing around with MongoDB trying to figure out how to do a simple SELECT province, COUNT(*) FROM contest …
mongodb group-by aggregation-frameworkIn MongoDB, is it possible to update the value of a field using the value from another field? The equivalent …
mongodb mongodb-query aggregation-frameworkI'd like to get the names of all the keys in a MongoDB collection. For example, from this: db.things.…
mongodb mongodb-query aggregation-frameworkFor example, I have these documents: { "addr": "address1", "book": "book1" }, { "addr": "address2", "book": "book1" }, { "addr": "address1", "book": "book5" }, { "addr": "address3", "…
mongodb aggregation-frameworkIs there a query for calculating how many distinct values a field contains in DB. f.e I have a …
mongodb mongodb-query aggregation-frameworkI have array in subdocument like this { "_id" : ObjectId("512e28984815cbfcb21646a7"), "list" : [ { "a" : 1 }, { "a" : 2 }, { "a" : 3 }, { "a" : 4 }, { "a" : 5 } ] } Can I …
mongodb filter mongodb-query aggregation-frameworkWhat's the syntax for doing a $lookup on a field that is an array of ObjectIds rather than just a …
mongodb mongodb-query aggregation-frameworkHow would I find duplicate fields in a mongo collection. I'd like to check if any of the "name" fields …
mongodb aggregation-framework database