                                    AND NVL(to_date(nvl(:V4,:ENDTIME),'YYMMDDHH24MISS'),SYSDATE)) H) H) ,
 
 ash as(SELECT b.*,
-              CEIL(SUM(AAS) OVER(PARTITION BY SQL_PLAN_LINE_ID,&OBJ)) tenv
+              ROUND(SUM(AAS) OVER(PARTITION BY SQL_PLAN_LINE_ID,&OBJ)*100/SUM(AAS) OVER(PARTITION BY SQL_PLAN_LINE_ID),1) tenv
        FROM (select /*+no_expand no_merge(b) ordered use_hash(b)*/ b.*
              FROM   qry a,ash_detail b 
              WHERE  a.phv = nvl(nullif(b.sql_plan_hash_value,0),a.phv)

         nvl(trim(dbms_xplan.format_size(SUM(DELTA_INTERCONNECT_IO_BYTES))),' ') io_bytes,
         listagg(CASE WHEN r <= 4 AND c0 = 1 THEN item END, ' / ') within GROUP(ORDER BY tenv DESC) top_event
  FROM  ( SELECT  s.*,
                  obj||'('||tenv||')' item,
                  row_number() OVER(PARTITION BY SQL_PLAN_HASH_VALUE,OBJ,tenv ORDER BY 1) c0,
                  dense_Rank() OVER(PARTITION BY SQL_PLAN_HASH_VALUE ORDER BY tenv DESC) r
          FROM  (
             SELECT s.*,&OBJ obj,
                    CEIL(SUM(AAS) OVER(PARTITION BY SQL_PLAN_HASH_VALUE,&OBJ)) tenv
             FROM   ash_detail s) s
        ) 
  GROUP  BY SQL_PLAN_HASH_VALUE

qry AS
 (SELECT DISTINCT sql_id sq,
         flag flag,
         'BASIC ROWS PARTITION PARALLEL PREDICATE NOTE REMOTE &adaptive &fmt' format,
         plan_hash_value phv,
         coalesce(child_number, plan_hash_value,0) plan_hash,
         inst_id
