Task: Text to Code
Input (English): Step 1: For each row in Charges table, find the corresponding rows in Treatments table.
Step 2: find each value of treatment_type_code in the results of step 1 along with the summation of charge_amount of the corresponding rows to each value
Output (English): SELECT T2.treatment_type_code , Sum ( T1.charge_amount ) FROM Charges AS T1 JOIN Treatments AS T2 GROUP BY T2.treatment_type_code