我的数据如下:
/* 1 */
{
"_id" : ObjectId("5b62f97e3c2094eefa912aba"),
"FietsID" : 1267,
"Stad" : "Antwerpen",
"Accelerometer" : 1.0,
"Decibel" : null,
"Datum" : ISODate("2017-06-06T05:45:06.000Z"),
"Location" : {
"type" : "Point",
"coordinates" : [
22.50891,
48.54121
]
}
}
/* 2 */
{
"_id" : ObjectId("5b62f97e3c2094eefa9128cc"),
"FietsID" : 1971,
"Stad" : "Antwerpen",
"Accelerometer" : 1.0,
"Decibel" : 55,
"Datum" : ISODate("2017-06-11T18:17:21.000Z"),
"Location" : {
"type" : "Point",
"coordinates" : [
-38.23146,
-6.75194
]
}
}我想得到所有时间低于06:00,分贝大于90,和'Stad‘只有安特卫潘的数据。
我尝试过使用聚合$dateToString,但我只能使用一个参数进行匹配。
https://stackoverflow.com/questions/51654977
复制相似问题