db.COLLECTION_NAME.aggregate([
{$group :
{
_id : {
"FIELD_1_ALIAS" : "$FIELD_1_NAME"
, "FIELD_2_ALIAS" : "$FIELD_2_NAME"
}
, AGGREGATION_RESULT_FIELD_ALIAS : {$avg : "$FIELD_NAME"}
}
}
]);
No comments:
Post a Comment