- Reference >
- Operators >
- Aggregation Pipeline Operators >
- Group Accumulator Operators >
- $max (aggregation)
$max (aggregation)¶
On this page
Definition¶
-
$max¶ Returns the highest value that results from applying an expression to each document in a group of documents that share the same group by key.
$maxis an accumulator operator available only in the$groupstage.$maxhas the following syntax:For more information on expressions, see Expressions.