标签:
select sum(case when t.lr_date > to_date(‘2013-12-12‘,‘yyyy-mm-dd‘) and 1=1 then 1 else 0 end) date1sum, sum(case when t.lr_date < to_date(‘2013-12-13‘,‘yyyy-mm-dd‘) and 1=1 then 1 else 0 end) date2sum, jsxm_code from cj_main t where 1=1 group by jsxm_code
标签:
原文地址:http://www.cnblogs.com/xiaoshi212/p/4351770.html