'How can I filter a SUM + QUERY (by date) without using the "select " statement?

I'm trying to populate a spreadsheet, month by month, using API's.

However, I'm struggling to filter by dates from the "Facebook API"

(I don't believe the "select * where date" is the way forward...)

Here's an image of the table, the query and

Here's my current formula I'm using to reference the sheet and sum values:

=SUM(QUERY(FacebookAPI!$2:$10049, "select "&SUBSTITUTE(ADDRESS(1,MATCH(C21,FacebookAPI!$2:$2,0),4),1,""),1))

SHEETS LINK BELOW:

https://docs.google.com/spreadsheets/d/19PnGcaaSe3XZRKi7oJ86imSUEu8K1B-SKPaqZJ-1I3Y/edit?usp=sharing



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source