Easier if you actually provided data so someone can test it ideally in mongo playground. However your group stage is putting the grouped fields under the _id and then you’re trying to do a $lookup on the fields as they were.
Comment out stages as you build the query to identify thing like this, it’s a critical way to debug issues.
1 Like