I have a MongoDB collection structured like this:
{
{
"_id": ObjectId,
"user_id": Number,
"updates": [
{
"_id": ObjectId,
"mode": Number,
"score": Number
},
{
"_id": ObjectId,
"mode": Number,
"score": Number
},
{
"_id": ObjectId,
"mode": Number,
"score": Number
}
]
}
}
My goal is to identify users with the highest number of updates per mode. For example, if I specify mode 0, I want to retrieve users based on the maximum number of updates with mode: 0
.
Can MongoDB handle this type of query? While speed isn't a top priority, since the data will be cached and processed asynchronously for an extended period.