MapReduce is a software framework introduced by Google in 2004 to support distributed computing on large data sets on clusters of computers, more about Map reduce.
Here is one simple example of data aggregation using via a java program.
1. Insert Customer records in to Mongodb
2. Categorize Customer as Major or Minor based on age and count the number of customers