                              (select name from v$latchname where latch#=p2 and rownum<2)
                         when p3text='class#' then
                              (select class from (SELECT class, ROWNUM r from v$waitstat) where r=p3)
+                        when current_obj#=0 then 'Undo'
                         --when p1text ='idn' then 'v$db_object_cache hash#'||p1
                         --when c.class is not null then c.class
                         else ''||greatest(current_obj#,-2)

                         DELTA_INTERCONNECT_IO_BYTES io_bytes,
                         aas aas0,
                         COUNT(DISTINCT sql_exec) over(PARTITION BY &OBJ) execs,
                         SUM(AAS) OVER(PARTITION BY &OBJ, SQL_PLAN_LINE_ID) aas,
                         SUM(AAS) OVER(PARTITION BY &OBJ, &OBJ1) aas1
                  FROM   ash a)
          GROUP  BY OBJ, ID, aas, OBJ1, aas1)
  GROUP  BY top_item

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
