select SNAP_ID,a.instance_number inst_id,
(select to_char(end_interval_time,'dd-MON-yyyy hh24:mi') from dba_hist_snapshot s where s.snap_id=a.snap_id and s.dbid=a.dbid and a.instance_number=s.instance_number) snaptime,
SQL_ID,EXECUTIONS_DELTA EXECUTIONS,PLAN_HASH_VALUE hash_value,ELAPSED_TIME_DELTA,
case when EXECUTIONS_DELTA>0 then round((ELAPSED_TIME_DELTA/1000000)/EXECUTIONS_DELTA,2) else 0 end "Avg Elapsed Time(s)"
from dba_hist_sqlstat a
where SQL_ID='&sql_id'
and EXECUTIONS_DELTA>0
order by SNAP_ID;
screenshot
--------------