Show the id for all customers with an account.
select customer_id from accounts
How many accounts do each of them have?
select count(*), customer_id from accounts group by customer_id