Subtotal
The first part of creating a Subtotal is sorting the
data. Now, you are ready to go to subtotal and make some choices.
Try it: Subtotal the Data
Select the entire spreadsheet
Go to Data ->Subtotal
At each change: Category.
You just sorted by Category, select Category for the
Subtotal so it matches.
Use function: Sum.
Add the subtotal select: Amount.
In your sample spreadsheet, amount is where the money
is. It makes sense to Sum the Amount.