-- =======================================================================
-- block tabela
-- =======================================================================
@@init
ttitle off
btitle off
accept t prompt "Entre com o nome da tabela: "
set pause off ver off feed off
col a heading "Arquivos"
col b heading "Blocos"
col c heading "Linhas"
col d heading "Linhas|Bloco"
col e heading "Blocos|Usados"
select /*+ rule */ count(distinct substr(rowid,15,4)) a
, count(distinct substr(rowid,1 ,8)) b
, count(substr(rowid,10,4)) c
,round(count(substr(rowid,10,4))/count(distinct substr(rowid,1,8))) d
, count(distinct(substr(rowid,1,8)||substr(rowid,15,4))) e
from &t
/
@@init