Task: Text to Code
Input (English): SQL: SELECT acc_type , Avg ( no_of_loans ) FROM customer WHERE credit_score < 50 GROUP BY acc_type
Feedback: Ensure to find average account balance instead of number of loans .
Output (English): SELECT avg(acc_bal) ,  acc_type FROM customer WHERE credit_score  <  50 GROUP BY acc_type