This is an old revision of the document!
SET pages 250 col begin_interval_time FOR a30 col sql_profile FOR a30 SET lines 200 col cpu_time_total FOR 9999999999999999 col elapsed_time_total FOR 9999999999999999 col iowait_total FOR 9999999999999999 SELECT a.INSTANCE_NUMBER,b.snap_id,b.begin_interval_time, a.plan_hash_value, a.optimizer_mode, a.sql_profile, a.disk_reads_total, a.buffer_gets_total, a.cpu_time_total,a.EXECUTIONS_TOTAL, (a.elapsed_time_total/1000000)elapsed_time_sec, a.iowait_total FROM dba_hist_sqlstat a, dba_hist_snapshot b WHERE sql_id='28cz3g3ybpfbn' AND a.snap_id=b.snap_id AND b.begin_interval_time > SYSDATE-2 ORDER BY 2;