CREATE TABLE loan (loan_id CLOB, loan_type CLOB, cust_id CLOB, branch_id CLOB, amount NUMBER)
CREATE TABLE bank (branch_id NUMBER, bname CLOB, no_of_customers NUMBER, city CLOB, state CLOB)
CREATE TABLE customer (cust_id CLOB, cust_name CLOB, acc_type CLOB, acc_bal NUMBER, no_of_loans NUMBER, credit_score NUMBER, branch_id NUMBER, state CLOB)

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'
SELECT SUM("T2"."amount") FROM "bank" "T1" JOIN "loan" "T2" ON "T1"."branch_id" = "T2"."branch_id" WHERE "T1"."state" = 'New York'