You have sales data with dates. When you take reports, we are not interested in dates but rather sales per month and year.

The columns are product, sales date, and sales volume.
We would like to know what the sales would have been for product a in Nov 2019 ?
Easiest way is to add extra columns to define year and month.

The column E is populated with MONTH formula and F with YEAR.

The November 2019 sales for product A can be counted this way.
First argument is sum column, which means column C as we have there the sales volume. Then we show where the product data situates, that is column A. Then the product we are interested is a in the cell I2. The range for month is in E column and the month value in J2. Similarly, the years are in F-column and year criteria in K2.
During Nov 2019 altogether 12 pieces of product ‘a’ were sold.

Another option is to use SUMPRODUCT function. The product information is in A-column, criteria which product is searched for is in F4. The dates are in B column, the criteria is in G4 inside the MONTH formula and the criteria for year in H4. Finally, sum column is in C2:C13. The arguments are separated by multiplication sign.
The sentence is here:
=SUMPRODUCT((A2:A13=F4)*(MONTH(B2:B13)=G4)*(YEAR(B2:B13)=H4)*(C2:C13))
For me, SUMPRODUCT is more compact than SUMIF. With SUMIF you need to add extra columns. If you handle large data sets, make new calculated columns the data even larger. As with SUMPRODUCT, you can embed month and year formulas inside SUMPRODUCT.
Just for comparison, I downloaded the same data into MySQL table.

I think, SQL is easiest of all.
