select max(ss.size_GB), avg(ss.size_GB)
from (select s.*, rownum rn2
from (select a.*
from (select t1.*, rownum rn
from (SELECT TRUNC(FIRST_TIME) time,
SUM(BLOCK_SIZE * BLOCKS) / 1024 / 1024 / 1024 size_GB
FROM V$ARCHIVED_LOG
GROUP BY TRUNC(FIRST_TIME)
order by time desc) t1) a
where a.rn > 1
order by a.time asc) s) ss
where ss.rn2 > 1;
----查询ASM使用率
select group_number,name,total_mb/1024 TGB,free_mb/1024 FGB,USABLE_FILE_MB/1024 from v$asm_diskgroup;