What are the names of the different customers who have taken out a loan, ordered by the total amount that they have taken?
select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id group by t1.cust_name order by sum(t2.amount)