Hello Everyone,
I'm a newbie at SQL and need to calculate a %, but I'm struggling.
I was orginally getting an error ORA-01476: "divisor is equal to zero"
I used nullif to get past the error:
(lu._used / nullif(lu.total,0) * 100)
but I realized I need to sum used & total and then calculate the percentage - and I can't seem to figure it out:
(sum(lu.used) / nullif(sum(lu.total,0) * 100)
But I cotinue to get invalid number of agrguments - I've tried several variations. Does anyone have any suggestions how I can resolve this ?
Thank you in advance !