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: Calcular o montante total de empréstimos socialmente responsáveis na África por ano.
 ###Tabelas: 
CREATE TABLE transactions (id INT PRIMARY KEY, customer_id INT, loan_id INT, transaction_date DATE, amount DECIMAL(10,2), is_socially_responsible BOOLEAN); CREATE TABLE regions (id INT PRIMARY KEY, name VARCHAR(255), country VARCHAR(255)); CREATE VIEW transaction_views AS SELECT transactions.id, transactions.amount, transactions.is_socially_responsible, transaction_date, regions.country FROM transactions INNER JOIN regions ON TRUE; CREATE VIEW yearly_transaction_views AS SELECT DATE_PART('year', transaction_date) AS year, transaction_views.amount, transaction_views.is_socially_responsible FROM transaction_views;
SELECT yearly_transaction_views.year, SUM(yearly_transaction_views.amount) AS total_amount FROM yearly_transaction_views WHERE yearly_transaction_views.is_socially_responsible = TRUE AND regions.country = 'Africa' GROUP BY yearly_transaction_views.year;