CREATE TABLE loan (credit_score INTEGER, cust_id VARCHAR(255)); CREATE TABLE customer (credit_score INTEGER, cust_id VARCHAR(255))
Find the average credit score of the customers who have some loan.
    
SQL: SELECT AVG(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan)