标签:cms 查询 when HERE type lse rom ice end
SELECT
COUNT(*) ,
SUM(CASE WHEN a.order_type = ‘巡检类‘ THEN 1 ELSE 0 END) AS TYPEA,
SUM(CASE WHEN a.order_type = ‘维修类‘ THEN 1 ELSE 0 END) AS TYPEB,
SUM(CASE WHEN a.order_type = ‘综合类‘ THEN 1 ELSE 0 END) AS TYPEC
FROM CMS_WORK_ORDER a
inner JOIN au_office o3 ON o3.id = a.office_id
where a.office_id = ‘010212‘
标签:cms 查询 when HERE type lse rom ice end
原文地址:https://www.cnblogs.com/carinen616/p/10278260.html