Show me all different products with problems!
select * from problems as t1 join product as t2 on t1.product_id = t2.product_id
How many problems do they each have for each product name?
select t2.product_name, count(*) from problems as t1 join product as t2 on t1.product_id = t2.product_id group by t2.product_name
Show me the names of the products in the bottom 3!
select t2.product_name from problems as t1 join product as t2 on t1.product_id = t2.product_id group by t2.product_name order by count(*) asc limit 3
What about the top 3?
select t2.product_name from problems as t1 join product as t2 on t1.product_id = t2.product_id group by t2.product_name order by count(*) desc limit 3