-- Database schema
| bank : branch_ID [ INT ] primary_key , bname [ TEXT ] , no_of_customers [ INT ] , city [ TEXT ] , state [ TEXT ] | customer : cust_ID [ TEXT ] primary_key , cust_name [ TEXT ] , acc_type [ TEXT ] , acc_bal [ INT ] , no_of_loans [ INT ] , credit_score [ INT ] , branch_ID [ INT ] customer.branch_ID = bank.branch_ID , state [ TEXT ] | loan : loan_ID [ TEXT ] primary_key , loan_type [ TEXT ] , cust_ID [ TEXT ] , branch_ID [ TEXT ] loan.branch_ID = bank.branch_ID , amount [ INT ] |
-- -- What is the total amount of money loaned by banks in New York state?

SELECT sum(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id  =  T2.branch_id WHERE T1.state  =  'New York';