CREATE TABLE loan (branch_id VARCHAR, amount INT)
CREATE TABLE bank (bname VARCHAR, branch_id VARCHAR)

Find the name of bank branch that provided the greatest total amount of loans.
SELECT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname ORDER BY SUM(T2.amount) DESC LIMIT 1
SELECT "T1"."bname" FROM "bank" AS "T1" JOIN "loan" AS "T2" ON "T1"."branch_id" = "T2"."branch_id" GROUP BY "T1"."bname" ORDER BY SUM("T2"."amount") DESC NULLS LAST LIMIT 1