what are the names of customers whose credit score is higher than 200?
select cust_name from customer where credit_score > 200
how about those whose credit score is less than 100?
select cust_name from customer where credit_score < 100
what are the names of bank branches that provided any loans to them?
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
which bank branch gave the greatest total amount of loans to a customer whose 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