0

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

SkyTaurus
  • 1
  • 2
  • What do you mean duration is not used. Did you try that. See the `_id` expressions in that answer. – Ashh Apr 17 '19 at 05:33
  • I need count overlap from created_at to closed_at by some interval. In answer used only create_at, without duration – SkyTaurus Apr 17 '19 at 07:39
  • @AnthonyWinzlet , I added a picture for explanation of what needs to be calculated. – SkyTaurus Apr 19 '19 at 19:46

0 Answers0