Database: loan_1
Question: 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)