select * from 
( 
    select 
        sql_id, 
        elapsed_time, 
        elapsed_time/executions avg_elapsed, 
        cpu_time/executions avg_cpu, 
        sql_text 
    from v$sql 
    order by avg_elapsed desc 
) 
where rownum < 30;
