Find the name and account balance of the customers who have loans with a total amount of more than 5000.
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
)
SELECT T1.cust_name, T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING SUM(T2.amount) > 5000
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the name and account balance of the customers who have loans with a total amount of more than 5000. ### Input: 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
) ### Response: SELECT T1.cust_name, T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING SUM(T2.amount) > 5000