记录mysql语句

查询每个验方中15,20,30克药的个数

select bindmcode,count(IF(mqty=15,true,null)),count(IF(mqty=20,true,null)),count(IF(mqty=30,true,null))from hb_constitute
where bindmcode like ‘YF%‘
group by bindmcode