I am looking for examples where in aggregate function, we doing MATCH first, and then Doing a Lookup.
E.g. I have 2 collections. Person and Payments. I want to list down all payments of a person having name as “Gaurav”, and payment date between “X Date range”
So, we will do an aggregate Query on Payments with lookup on Payments, and the output to have data from Payments with fields from Person too.
A. Filter on Payments before Lookup to Person.
b. Pipeline on matching name of Person
c. Filter on joined query.
Can someone share a scenario similar to this along with the sample aggregation query. Its bit urgent.