摘要: SELECT nvl(i.tools_model, 'ALL'),
COUNT(decode(r.maintain_no, 'MAINTAIN', 'MAINTAIN','REPAIR', 'REPAIR', null)) as "維修總次數",
COUNT(decode(r.maintain_no, 'MAINTAIN', 'MAINTAIN', null)) as "正常維修次數",
COUNT(decode(r.maintain_no, 'REPAIR', 'REPAIR', null)) as "返修次數",
case COUNT(decode(r.maintain_no, 'MAINTAIN', 'MAINTAIN','REPAIR', 'REPAIR', null))
when 0 then 0
else
COUNT(decode(r.maintain_no, 'REPAI
阅读全文