Painting Blue Code
Simple, self-explanatory code snippets.
2018-01-06
MongoDB - Aggregation, simple group by single field with frequency count
db.[COLLECTION_NAME].
aggregate
([
{"$group" : {_id:"$FIELD_TO_GROUP_BY",
count
:{$
sum
:
1
}}}
])
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)