SELECT AVG(acc_bal), acc_type FROM customer WHERE credit_score < 50 GROUP BY acc_type
For each account type, find the average account balance of customers with credit score lower than 50.
CREATE TABLE loan (
    loan_id text,
    loan_type text,
    cust_id text,
    branch_id text,
    amount number
)

CREATE TABLE customer (
    cust_id text,
    cust_name text,
    acc_type text,
    acc_bal number,
    no_of_loans number,
    credit_score number,
    branch_id number,
    state text
)

CREATE TABLE bank (
    branch_id number,
    bname text,
    no_of_customers number,
    city text,
    state text
)