how many loans are there?
select count(*) from loan
what is the total amount of loans?
select sum(amount) from loan
Find the names of customers who have at least one loan.
select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id
which of them have more than one loan?
select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id group by t1.cust_name having count(*) > 1