-
Type: Task
-
Resolution: Won't Do
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: manual
-
Labels:
Description
I think you should add an example that groups on multiple fields in
https://docs.mongodb.com/manual/reference/operator/aggregation/group/
I ended up learning about this elsewhere, but the quality of those web pages was much lower than the quality of MongoDB docs, so I prefer to remain within the docs.
I wanted to do something like:
db.sales.aggregate( [ { $group: { _id: { v1,: "field1", v2: "field2" }, count: { $sum: 1 } } } ] )