C
Size: a a a
C
C
use spdb
db.createCollection('fsta-articles');
db.getCollection('fsta-articles').createIndex({"ANIP" : 1});
ГМ
go
go
ГМ
.aggregate(
[
{
"$unwind" : "$lines"
},
{
"$unwind" : "$lines.history"
},
{
"$match" : {
"$and" : [
{
"lines.history.operationStatus" : "DONE"
},
{
"lines.history.timeStamp" : {
"$gte" : ISODate("2020-05-21T08:20:00.000+0000"),
"$lte" : ISODate("2020-05-22T08:30:00.000+0000")
}
}
]
}
},
{
"$project" : {
"historyId" : "$lines.history._id",
"extObjectId" : "$extObjectId",
"timestamp" : "$lines.history.timeStamp",
"quantity" : "$lines.history.quantity"
}
}
],
{
"allowDiskUse" : false
}
)ГМ
ГМ
ГМ
ГМ
go
ГМ
ГМ
АА
АА
C
C
VL
NK