当前位置:Gxlcms > 数据库问题 > 记录mysql语句

记录mysql语句

时间:2021-07-01 10:21:17 帮助过:17人阅读

查询每个验方中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

 

记录mysql语句

标签:mysql语句   group by   bin   sql   nbsp   bsp   from   bind   count   

人气教程排行