I have this query:
db.collection.aggregate([
{
$group: {
_id: "$PATIENT_ID",
MASS: { $max: "$max_field" }
}
}
]);
The result of this query is:
{ "_id" : "TCGA-A2-A0YD", "mass" : 0.994683301742671 }
{ "_id" : "TCGA-A2-A3XX", "mass" : 0.993455527786917 }
I have this second query:
db.collection.aggregate([
{
$group: {
_id: "TCGA-A2-A3XX",
MASS: { $max: "$max_field" }
}
}
]);
The result of this second query is:
{ "_id" : "TCGA-A2-A3XX", "mass" : 0.994683301742671 }
Why?
I expected another value for this id TCGA-A2-A3XX