Database

[{"_id":ObjectId("62fb40acd762c3e1150e0133"),"collections":ObjectId("62fb24130d026bd9140c3f3a"),"floorPrice":297500000,"listedCount":"259","date":ISODate("2022-08-16T07:01:00.035Z"),"__v":0},{"_id":ObjectId("62fb40acd762c3e1150e0135"),"collections":ObjectId("62fb39140d026bd9140c44d2"),"floorPrice":-1369803776,"listedCount":"101","date":ISODate("2022-08-16T07:01:00.035Z"),"__v":0},{"_id":ObjectId("62fb40acd762c3e1150e0137"),"collections":ObjectId("62fb38fc0d026bd9140c44cd"),"floorPrice":1010065408,"listedCount":"1017","date":ISODate("2022-08-16T07:01:00.035Z"),"__v":0},{"_id":ObjectId("62fb40acd762c3e1150e0139"),"collections":ObjectId("62fb38da0d026bd9140c44c8"),"floorPrice":95032704,"listedCount":"327","date":ISODate("2022-08-16T07:01:00.035Z"),"__v":0},{"_id":ObjectId("62fb40acd762c3e1150e013b"),"collections":ObjectId("62fb24030d026bd9140c3f32"),"floorPrice":-1189934592,"listedCount":"273","date":ISODate("2022-08-16T07:01:00.035Z"),"__v":0},{"_id":ObjectId("62fb4430d762c3e1150e013e"),"collections":ObjectId("62fb39140d026bd9140c44d2"),"floorPrice":-1369803776,"listedCount":"100","date":ISODate("2022-08-16T07:16:00.033Z"),"__v":0},{"_id":ObjectId("62fb4430d762c3e1150e0140"),"collections":ObjectId("62fb38da0d026bd9140c44c8"),"floorPrice":-4967296,"listedCount":"325","date":ISODate("2022-08-16T07:31:00.033Z"),"__v":0}]

Query

db.collection.aggregate([{$group:{_id:{$dateAdd:{startDate:new Date(),unit:"minute",amount:{$multiply:[{$ceil:{$divide:[{$dateDiff:{startDate:"$date",endDate:new Date(),unit:"minute"}},15]}},-15]}}},floorPrice:{"$min":"$floorPrice"},listedCount:{"$min":"$listedCount"}}}])

Result