@nls set define on set term on set show off set ver off column service_name format a16 select T.date_load, T.inst_id, trunc(T.load_avg), trunc(T.cpu_perc_usage) from ASTSYSADMIN.t_current_load_os T where T.inst_id = &1 and T.date_load between to_date('&2 &3'||':00','ddmmyyyy hh24:mi:ss') and to_date('&2 &3'||':00','ddmmyyyy hh24:mi:ss') + 5/24/60; select T.*,sum(count_proc) over(partition by date_load) total from ASTSYSADMIN.T_CURRENT_LOAD T where T.inst_id = &1 and T.date_load between to_date('&2 &3'||':00','ddmmyyyy hh24:mi:ss') and to_date('&2 &3'||':00','ddmmyyyy hh24:mi:ss') + 5/24/60 and T.username is not null order by T.count_proc desc; select T.*,sum(count_proc) over(partition by date_load) total from ASTSYSADMIN.T_CURRENT_LOAD T where T.inst_id = &1 and T.date_load between to_date('&2 &3'||':00','ddmmyyyy hh24:mi:ss') and to_date('&2 &3'||':00','ddmmyyyy hh24:mi:ss') + 5/24/60 and T.service_name is not null order by T.count_proc desc; select T.*,sum(count_proc) over(partition by date_load) total from ASTSYSADMIN.T_CURRENT_LOAD T where T.inst_id = &1 and T.date_load between to_date('&2 &3'||':00','ddmmyyyy hh24:mi:ss') and to_date('&2 &3'||':00','ddmmyyyy hh24:mi:ss') + 5/24/60 and T.profile is not null order by T.count_proc desc;