Task: Text to Code
Input (English): Step 1: For each row in ACCOUNTS table, find the corresponding rows in SAVINGS table.
Step 2: find each value of ACCOUNTS's custid in the results of step 1 along with the summation of balance of the corresponding rows to each value
Output (English): SELECT T1.name , Sum ( T2.balance ) FROM ACCOUNTS AS T1 JOIN SAVINGS AS T2 ON T1.custid = T2.custid GROUP BY T1.custid