Abaixo está uma instrução que descreve uma tarefa de geração de SQL, combinada com uma entrada que fornece mais contexto sobre os esquemas de tabela disponíveis. Escreva o código SQL que responda adequadamente à solicitação
 ###Instrução: Error code: 429 - {'error': {'message': 'You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.', 'type': 'insufficient_quota', 'param': None, 'code': 'insufficient_quota'}}
 ###Tabelas: 
CREATE TABLE chemicals (chemical_id INT, chemical_name VARCHAR(50)); CREATE TABLE safety_incidents (incident_id INT, chemical_id INT, incident_date DATE); INSERT INTO chemicals (chemical_id, chemical_name) VALUES (1, 'Chemical A'), (2, 'Chemical B'); INSERT INTO safety_incidents (incident_id, chemical_id, incident_date) VALUES (1, 1, '2022-01-01'), (2, 2, '2022-01-01');
SELECT chemicals.chemical_name, COUNT(safety_incidents.incident_id) FROM chemicals LEFT JOIN safety_incidents ON chemicals.chemical_id = safety_incidents.chemical_id WHERE safety_incidents.incident_date >= DATE_SUB(CURDATE(), INTERVAL 6 MONTH) GROUP BY chemicals.chemical_name;