Created
December 15, 2014 16:46
-
-
Save alkampfergit/bcb8364c67ba7703152a to your computer and use it in GitHub Desktop.
NEventStore mongo provider get count of events by type
This file contains 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.Commits.aggregate([ | |
{$sort: {_id:1}}, | |
{$unwind : "$Events"}, | |
{$project : { event : '$Events.Payload.Body._t'}}, | |
{$group : { | |
'_id' : '$event', | |
'count' : {$sum : 1}} | |
} | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment