ASH: queries ranged by run time

select
s.SQL_TEXT,
aa.cnt,
aa.SESSION_SERIAL#
from
v$sql s,
(
select * from
(
select count(sample_id) cnt, ash.SESSION_SERIAL#, sql_id, SQL_CHILD_NUMBER, sql_exec_id, top_level_sql_id
from v$active_session_history ash
where
ash.SQL_EXEC_START between &date_from and &date_to
group by ash.SESSION_SERIAL#, sql_id, sql_child_number, sql_exec_id, top_level_sql_id
order by 1 desc
)
where
rownum < 200
) aa
where
s.SQL_ID = aa.SQL_ID
and s.CHILD_NUMBER = aa.sql_child_number
order by
aa.cnt desc