Introduction
The $sum accumulator helps add up numbers in a group. It is useful to find totals easily.
When you want to find the total sales amount from many sales records.
When you need to count how many items were sold in each category.
When you want to add up points scored by players in a game.
When you want to calculate the total expenses from a list of transactions.