select c.LINE, c.SITE, c.REELNO, max(c.ACTIONDATE) dt,
count(*) "總次數",
count(decode(c.status,0,0,null)) "通過次數",
count(decode(c.status,1,1,null)) "異常次數"
from tbl_smt_check c, tbl_smt_seq s
where c.SEQ = s.SEQ and c.STATUS in (0, 1)
其中,STATUS數據列的值為 0 或者 1
posted on 2009-10-16 14:03
Ke 阅读(621)
评论(0) 编辑 收藏 所属分类:
oracle