SELECT count(case when `status`=5 then 1 else null end) as countOk,
count(case when `status`=8 then 1 else null end) as countNo FROM mtl_order where store_id = 92
MySQL同时统计两个条件的记录条数
只有O和1的世界是简单的!
SELECT count(case when `status`=5 then 1 else null end) as countOk,
count(case when `status`=8 then 1 else null end) as countNo FROM mtl_order where store_id = 92