What are the number of products that had problems?
select count ( * ) from problems as t1 join product as t2 on t1.product_id = t2.product_id
Could you please list their product ids?
select t2.product_id from problems as t1 join product as t2 on t1.product_id = t2.product_id
What are the number of problems each of these had?
select count ( * ), t2.product_id from problems as t1 join product as t2 on t1.product_id = t2.product_id group by t2.product_id