with ash as (select /*+ materialize*/ CAST(sample_time AS DATE) as stime, s.* from &1) --SYSTEM.ASH_201901151747 s)--dba_hist_active_sess_history s where '&&2' is ...
with ash as (select /*+ materialize*/ CAST(sample_time AS DATE) as stime, s.* from dba_hist_active_sess_history s where '&&2' is null OR snap_id between '&&2' and nvl ...
The SUBSTR function returns a substring of a string. If string is a character string, the result of the function is a character string represented in the code page of its first argument. If it is a ...