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: Listar projetos, seus membros da equipe e o número de protocolos de segurança associados a cada produto químico utilizado nos projetos.
 ###Tabelas: 
CREATE TABLE projects (id INT PRIMARY KEY, name VARCHAR(255), start_date DATE, end_date DATE); CREATE TABLE project_team_members (id INT PRIMARY KEY, project_id INT, employee_id INT, role VARCHAR(255), FOREIGN KEY (project_id) REFERENCES projects(id), FOREIGN KEY (employee_id) REFERENCES employees(id)); CREATE TABLE project_chemicals (id INT PRIMARY KEY, project_id INT, chemical_name VARCHAR(255), FOREIGN KEY (project_id) REFERENCES projects(id), FOREIGN KEY (chemical_name) REFERENCES chemical_inventory(chemical_name)); CREATE TABLE safety_protocols (id INT PRIMARY KEY, chemical_name VARCHAR(255), protocol VARCHAR(255), FOREIGN KEY (chemical_name) REFERENCES chemical_inventory(chemical_name));
SELECT projects.name, employees.name AS team_member, COUNT(safety_protocols.id) AS safety_protocols_count FROM projects INNER JOIN project_team_members ON projects.id = project_team_members.project_id INNER JOIN employees ON project_team_members.employee_id = employees.id INNER JOIN project_chemicals ON projects.id = project_chemicals.project_id INNER JOIN chemical_inventory ON project_chemicals.chemical_name = chemical_inventory.chemical_name INNER JOIN safety_protocols ON chemical_inventory.chemical_name = safety_protocols.chemical_name GROUP BY projects.id, employees.id;