📜  mysql 多次计数 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:35.940000             🧑  作者: Mango

代码示例1
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;