The
_id
expression specifies the group key. If you specify an_id
value of null, or any other constant value, the$group
stage returns a single document that aggregates values across all of the input documents. See the Group by Null example.
1 Like