Perform aggregate reduce operations on MongoDB.