I have a "event" collection like this structure -
{
_id: ObjectId("545a0b63b03dbcd1238b4567"),
status: 1004,
created_at: ISODate("2014-11-05T11:34:59.804Z"),
closed_at: ISODate("2014-11-05T11:34:59.804Z")
},
{
_id: ObjectId("545a0b66b03dbcd1238b4568"),
status: 1001,
created_at: ISODate("2014-11-05T11:35:02.814Z"),
closed_at: ISODate("2014-11-05T11:34:59.804Z")
}
....
I need to get result grouped by 15 minutes overlap interval from that collection. I found a similar solution, but the duration is not used here. group by start without duration
added a picture for explanation image