Mongo Documentation
We use find and aggregrate mongo query types. You can read up on how the mongo aggregation pipeline works here.
Taking our event from earlier, let's write some queries to display some of the data we were seeing.
Requests By Date and Name
Query
[ { "$match":{ "tags.category":"#category#", "tags.action": "#action#", "date":{ "$gte":"#gte#", "$lte":"#lte#" } } }, { "$project":{ "action":"$tags.action" } }, { "$group":{ "_id":"$action", "count":{ "$sum":1 } } } ]
Click the image to increase the size.
Result
{ "utilities": [ { "_id": "Start", "count": 4 } ] }