As our friend Manieiro said, it’s pure mathematics.
Just multiply the percentage by value.
Example: calculate 30% of 700.
Just multiply the fraction 30/100 by 700.
Now in PL/SQL I have the column percentage which is the value for 50% column on the right side titu_valo that is corresponds to tuition.
I do exactly as explained above, first in parentheses I do the calculation of the fraction of 50 that corresponds to 50% divided by 100 that is the denominator of the percentage and soon after multiplied by the value of the monthly fee, being thus:
((50/100) * titu_valo)
Upshot:
That’s it:
select tp, ipi, sum( tp + ipi ) as total from tabela group by tp, ipi
?– Reginaldo Rigo