-
Type: New Feature
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.5.6
-
Component/s: Aggregation Framework
-
Query Optimization
When performing an aggregation query in mongodb, it would sometimes be useful to reference the previous document. As we have the `$$ROOT` variable, perhaps we could have `$$PREVIOUS` or some other meaningful name that let's us do document to document calculations.
A possible use case would be calculating time passed in between documents more easily, and calculating deltas between documents.
- duplicates
-
SERVER-54243 Desugar $shift window function to $first with one-document window
- Closed
- is related to
-
SERVER-4437 aggregation: support windowing operation on pipelines
- Closed
-
SERVER-5192 Support variables in aggregation
- Closed
-
SERVER-29339 allow using $reduce expression as accumulator in $group
- Backlog