(select sum(kwh_val) from his_pbs_20041201 where pulse_id = a.pulse_id and to_number(to_char(unix_to_oracle(oclearcase/" target="_blank" >ccur_time),'hh24'))=0 ) as v0,
(select sum(raw_val) from his_pbs_20041201 where pulse_id = a.pulse_id and to_number(to_char(unix_to_oracle(occur_time),'hh24'))=0 ) as r0,
(select sum(status) from his_pbs_20041201 where pulse_id = a.pulse_id and to_number(to_char(unix_to_oracle(occur_time),'hh24'))=0 ) as st0,
from his_pbs_20041201 a
where pulse_id = 164000029;
sum(case to_number(to_char(unix_to_oracle(occur_time),'hh24')) when 0 then kwh_val else 0 end) as v0,
sum(case to_number(to_char(unix_to_oracle(occur_time),'hh24')) when 0 then raw_val else 0 end) as r0,
sum(case to_number(to_char(unix_to_oracle(occur_time),'hh24')) when 0 then status else 0 end) as st0,
from his_pbs_20041201 a
group by a.pulse_id,a.field_id;