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

Find the name of bank branch that provided the greatest total amount of loans to customers with credit score is less than 100.
SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 GROUP BY T2.bname ORDER BY SUM(T1.amount) DESC LIMIT 1
SELECT "T2"."bname" FROM "loan" AS "T1" JOIN "bank" AS "T2" ON "T1"."branch_id" = "T2"."branch_id" JOIN "customer" AS "T3" ON "T1"."cust_id" = "T3"."cust_id" AND "T3"."credit_score" < 100 GROUP BY "T2"."bname" ORDER BY SUM("T1"."amount") DESC NULLS LAST LIMIT 1