Details
-
Improvement
-
Resolution: Won't Fix
-
Trivial - P5
-
None
-
None
-
None
Description
I was recently trying to determine whether or not I could calculate a sum during an aggregation $group stage, based on certain conditions.
However, neither the $group, nor the $cond documentation (or $sum, for that matter) make any reference to the fact that this is possible. I think it may be helpful to include an example, or at least to reference that this is in fact possible.