OPTIONS

Group Aggregation OperatorsΒΆ

Name Description
$addToSet Returns an array of all the unique values for the selected field among for each document in that group.
$first Returns the first value in a group.
$last Returns the last value in a group.
$max Returns the highest value in a group.
$min Returns the lowest value in a group.
$avg Returns an average of all the values in a group.
$push Returns an array of all values for the selected field among for each document in that group.
$sum Returns the sum of all the values in a group.