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: Identificar os 5 principais clientes por valor total gasto em empréstimos socialmente responsáveis na Europa.
 ###Tabelas: 
CREATE TABLE customers (id INT PRIMARY KEY, name VARCHAR(255), age INT, gender VARCHAR(50)); 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 customer_transaction_views AS SELECT customers.id, customers.name, transactions.id AS transaction_id, transactions.amount, transactions.is_socially_responsible, regions.country FROM customers INNER JOIN transactions ON customers.id = transactions.customer_id INNER JOIN regions ON TRUE; CREATE VIEW total_customer_spending AS SELECT customer_transaction_views.name, SUM(customer_transaction_views.amount) AS total_amount FROM customer_transaction_views WHERE customer_transaction_views.is_socially_responsible = TRUE GROUP BY customer_transaction_views.name;
SELECT total_customer_spending.name, total_customer_spending.total_amount FROM total_customer_spending WHERE total_customer_spending.total_amount IN (SELECT total_amount FROM (SELECT total_customer_spending.total_amount FROM total_customer_spending WHERE total_customer_spending.country = 'Europe' AND total_customer_spending.is_socially_responsible = TRUE ORDER BY total_amount DESC LIMIT 5) AS subquery);