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 as 3 instituições financeiras mais ativas em conformidade com a Sharia no Oriente Médio por contagem de transações.
 ###Tabelas: 
CREATE TABLE banks (id INT PRIMARY KEY, bank_name VARCHAR(255), region_id INT, is_shariah_compliant BOOLEAN); CREATE TABLE transactions (id INT PRIMARY KEY, bank_id INT, transaction_date DATE, amount DECIMAL(10,2)); CREATE TABLE regions (id INT PRIMARY KEY, name VARCHAR(255), country VARCHAR(255)); CREATE VIEW bank_transaction_views AS SELECT banks.id, banks.bank_name, transactions.id AS transaction_id, transactions.amount, transactions.transaction_date, regions.country FROM banks INNER JOIN transactions ON banks.id = transactions.bank_id INNER JOIN regions ON TRUE; CREATE VIEW active_banks AS SELECT bank_transaction_views.bank_name, COUNT(bank_transaction_views.transaction_id) AS transaction_count FROM bank_transaction_views WHERE bank_transaction_views.is_shariah_compliant = TRUE GROUP BY bank_transaction_views.bank_name;
SELECT active_banks.bank_name, active_banks.transaction_count FROM active_banks WHERE active_banks.transaction_count IN (SELECT transaction_count FROM (SELECT active_banks.transaction_count FROM active_banks WHERE active_banks.country = 'Middle East' AND active_banks.is_shariah_compliant = TRUE ORDER BY transaction_count DESC LIMIT 3) AS subquery);