摘要:
经典的sql语句保存select case 4-2 when 1 then 'one' when 2 then 'two' else 'more' end;select T.MediaCode,T.MediaName,sum(1) as total,sum(case T.state when 1 then 0 else 1 end) as '未处理', --如果T.state ==1 就统计为0 个数否则统计为1的个数sum(case T.state when 1 then 1 else 0 end) as '已提交 阅读全文