find the names of customers who have a loan.
select distinct t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id
which of them have a mortgage loan?
select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id where loan_type = 'Mortgages'
among them, who has an Auto loan as well?
select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id where loan_type = 'Mortgages' intersect select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id where loan_type = 'Auto'