复制--alter session set nls_date_format=yyyy-mm-dd hh24:mi:ss; select trunc(sample_time,分享 mi) tm, sql_id, nvl(event,CPU),count(distinct session_id) cnt from dba_hist_active_sess_history where sample_time between to_date(2019-08-22 14:00:00) and to_date(2019-08-22 14:30:00) group by trunc(sample_time, mi), sql_id,nvl(event,CPU) order by cnt desc; 1.2.3.4.5.6.7.