I have two quantities a total value and a value to date and I need to take the percentage, example:
ValorTotal = 66215
ValorALaFecha = 5524
Porcentaje = ?
At what percentage is the ValueAutumn equal to TotalTotal .
I have two quantities a total value and a value to date and I need to take the percentage, example:
ValorTotal = 66215
ValorALaFecha = 5524
Porcentaje = ?
At what percentage is the ValueAutumn equal to TotalTotal .
Applying 3 simple ((x * 100.0) / total)
Porcentaje = ((ValorALaFecha * 100.0)/ValorTotal )
If there are two records of the same table
SELECT ValorTotal , ValorALaFecha , ((ValorALaFecha * 100.0)/ValorTotal )AS Porc from tabla