Skip to content
Advertisement

Tag: aggregation

Aggregation $match within a $sum

I was wondering if it was possible to somehow use the $match operator within the $sum function for aggregation. I want to be able to use the value of the $sum operator within the project fields somehow, I just don’t really understand what the right approach would be for this. Sample Input (may be too long): https://www.toptal.com/developers/hastebin/ixamekaxoq.json Sample Output: (

Advertisement