Finding max array count with hour interval in MongoDb
I have a collection in MongoDb and the data in it is as follows. [ { "_id" : ObjectId(""), "at" : ISODate("2022-03-27T11:56:00.000Z"), "personIds" : 13355, "productIds" : [ "c3cc8b62-f9f7-4845-8585-effb1efd790d", "af59b890-61b6-45a6-b2a1-32e16ba1a136" ] }, { "_id" : ObjectId(""), "at" : ISODate("2022-03-28T11:56:00.000Z"), "personIds"…