Having problems with the below SQL. Running from an interactive session until it is working correctly but it currently is not returning the percent. Currently it is only return Zero's. Does anyone know what I am missing?
Return values
DECIMAL MAX NUM
.0000000000 14,000,000 8,147,769
Code:
select decimal(percent,10,10), max, num from (select Decimal(num/max, 10,10) as percent, max, num from (select sum(maxdoc) as max, sum(numdoc) as num from y07u999s) as fold1) as percent
DECIMAL MAX NUM
.0000000000 14,000,000 8,147,769
Comment