Please look at the picture of example below
This is only a simplified example, in fact, I have many months and years recorded in my spreadsheet file, however, I'd like to create a sum of income and expense of EACH month individually, do I need to do it one by one or is there any more automated way to make this?
In fact, at the moment, when I want to check the total income or expense in a months, I need to manually select that particular month, sometimes there could be up to tens or hundreds of rows to select, is there any automated way?

This is only a simplified example, in fact, I have many months and years recorded in my spreadsheet file, however, I'd like to create a sum of income and expense of EACH month individually, do I need to do it one by one or is there any more automated way to make this?
In fact, at the moment, when I want to check the total income or expense in a months, I need to manually select that particular month, sometimes there could be up to tens or hundreds of rows to select, is there any automated way?