Can you list the customer names and ids who have credit cards?
select t1.customer_id, t2.customer_first_name, t2.customer_last_name from customers_cards as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.card_type_code = "Credit"
I want to know the customer names and how many credit cards they have?
select t2.customer_first_name, t2.customer_last_name, count ( * ) from customers_cards as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.card_type_code = "Credit" group by t1.customer_id
How many credit cards does Blanche Huels have?
select count ( * ) from customers_cards as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.customer_first_name = "Blanche" and t2.customer_last_name = "Huels" and t1.card_type_code = "Credit"