Find the average credit score of the customers who have some loan.
SELECT avg(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan)
average credit score = AVG(credit_score); customers who have some loan refers to filtering customers having an entry in the loan table;