MySQL cuenta múltiple

select count(*) as total_count,
count(if(product='A',1,null)) as A_count,
count(if(product='B',1,null)) as B_count
from product_sales;
Testy Trout