SELECT OPERATION_DATE,COUNT(start_pv) ,sum(start_pv) from testcount where start_pv <> 0 group by operation_date
union
SELECT OPERATION_DATE,COUNT(cart_pv),sum(cart_pv) from testcount where cart_pv <> 0 group by operation_date
union
SELECT OPERATION_DATE,COUNT(lefv_pv),sum(lefv_pv) from testcount where lefv_pv <> 0 group by operation_date
union
SELECT OPERATION_DATE,COUNT(fing_pv),sum(fing_pv) from testcount where fing_pv <> 0 group by operation_date
;
select * from testcount;
select t.operation_date,sum(t.a) from (select operation_date,start_pv, decode(sign(start_pv - 1),0,1,1,1) as a from testcount) t
group by t.operation_date;