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
}}}
])
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment