- 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.
$max
is an accumulator operator available only in the$group
stage.$max
has the following syntax:For more information on expressions, see Expressions.