what is the total amount of all loans?
select sum(amount) from loan
find the names of bank branches that provided these loans.
select t1.bname from bank as t1 join loan as t2 on t1.branch_id = t2.branch_id
which one offered 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