Task: Text to Code
Input (English): Step 1: For each row in bank table, find corresponding rows in customer table and in loan table.
Step 2: find the summation of amount of each value of cust_name in the results of step 1.
Step 3: find cust_name of the results of step 1 with largest value in the results of step 2
Output (English): SELECT T2.cust_name FROM bank AS T1 JOIN customer AS T2 ON T2.branch_ID = T1.branch_ID JOIN loan AS T3 ON T1.branch_ID = T3.branch_ID GROUP BY T2.cust_name ORDER BY Sum ( T3.amount ) Desc LIMIT 1