CREATE TABLE bank (branch_id DECIMAL, bname TEXT, no_of_customers DECIMAL, city TEXT, state TEXT)
CREATE TABLE loan (loan_id TEXT, loan_type TEXT, cust_id TEXT, branch_id TEXT, amount DECIMAL)
CREATE TABLE customer (cust_id TEXT, cust_name TEXT, acc_type TEXT, acc_bal DECIMAL, no_of_loans DECIMAL, credit_score DECIMAL, branch_id DECIMAL, state TEXT)

Find the name and credit score of the customers who have some loans.
SELECT DISTINCT T1.cust_name, T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id
SELECT DISTINCT "T1"."cust_name", "T1"."credit_score" FROM "customer" AS "T1" JOIN "loan" AS "T2" ON "T1"."cust_id" = "T2"."cust_id"