Please try the following thing in your SQL query to fix the error:
The error occurs when we face the 0 value on the divisor side, then we will get an error.
SQL> select 1/0 from dual;
select 1/0 from dual
*
ERROR at line 1:
ORA-01476: divisor is equal to zeroTo overcome this issue, we will use a case or nullif statement to handle the 0 value before this situation occurs
Use of case statement — the case will check whether that the divisor is 0 or not then it will not calculate if it is 0
-- Case Statement
case when value2 <> 0 then value1 / value2 * 100 else null endUse of nullif statement — Nullif changes the 0 value to null so, it does not calculate anything
value1 / nullif(value2, 0) * 100