text: Below is an context that describes a sql query, paired with an question that provides further information. Write an answer that appropriately completes the request.  # noqa: E501
  ### Context:
  CREATE TABLE loan (credit_score INTEGER, cust_id VARCHAR); CREATE TABLE customer (credit_score INTEGER, cust_id VARCHAR)
  ### Question:
  Find the average credit score of the customers who have some loan.
  ### Answer:
  SELECT AVG(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan)