SUMIFS function - Google Docs Editors Help
Returns the sum of a range depending on multiple criteria. SUMIFS for BigQuery Returns a conditional sum of a data column depending on multiple criteria.