Show the names of all customers.
select customer_name from customers
Count the number of orders each of them has made.
select t1.customer_name, count(*) from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id group by t1.customer_id
For each of them, how many of their orders use Credit Card payment method?
select t1.customer_name, count(*) from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where t1.payment_method_code = 'Credit Card' group by t1.customer_id
Show the names of those who have more than 2 such orders.
select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where t1.payment_method_code = 'Credit Card' group by t1.customer_id having count(*) > 2