I have this nice query for daily SQL analyst's work:
select c.owner, c.table_name,t.num_rows,  
    c.num_distinct, c.num_nulls, c.Column_name,',' s
--,c.* 
from dba_tab_Columns c, dba_tables t
where c.owner = t.owner and c.table_name = t.table_name  
and c.table_name = upper(:1) and num_distinct >1 order by column_id;
Now it like to expand it to calcualte the percentage or NULL-Columns in the table.  Now I'm a bit stuck with this:
Either this
select c.owner, c.table_name,t.num_rows,  
    decode (c.num_nulls,null, null, to_char(t.num_rows / c.num_nulls,'99.999' )) non_nulls, 
    c.num_distinct, c.num_nulls, c.Column_name,',' s
--,c.* 
from dba_tab_Columns c, dba_tables t
where c.owner = t.owner and c.table_name = t.table_name  
and c.table_name = upper(:1) and num_distinct >1 order by column_id;
or that
select c.owner, c.table_name,t.num_rows,  
    nvl2(c.num_nulls, null, to_char(t.num_rows / nvl(c.num_nulls,0.0001),'99.999' )) non_nulls, 
    c.num_distinct, c.num_nulls, c.Column_name,',' s
--,c.* 
from dba_tab_Columns c, dba_tables t
where c.owner = t.owner and c.table_name = t.table_name  
and c.table_name = upper(:1) and num_distinct >1 order by column_id;
both bring error message:  [Error] Execution (19: 56): ORA-01476: Divisor ist Null
Can you please provide some help on this?
How to avoid the calculation to be evaluated, if the divisor is NULL?