Created
November 4, 2016 12:40
-
-
Save anapaulagomes/93a7b5345452f00d0c2a709c9e4e56c6 to your computer and use it in GitHub Desktop.
Group by field and count the occurrences
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.logs.aggregate({$group: {_id: {'exchangeType': '$result.exchangeType'}, soma: {$sum: 1}}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment