What you want to do is join table_2 to the table_1, using the on condition such that table_1. cancel_date is between table_2.cancel_start_date and table_2.cancel_end_date. But first we need to use the DATE_PARSE function to make the dates comparable. Finally just sum up the values.
SELECT
table_1.product,
table_2.realdate,
SUM(total_cancels) AS total_cancels,
CONCAT(table_2.cancel_start_date, '-', table_2.cancel_end_date) as start_to_end
FROM table_1
JOIN table_2
WHERE DATE_PARSE(table_1. cancel_date, '%m/%d/%Y')
BETWEEN DATE_PARSE(table_2.cancel_start_date, '%m/%d/%Y')
AND DATE_PARSE(table_2.cancel_end_date, '%m/%d/%Y')
GROUP BY 1, 2, 4
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…