|
En oracle funcionan y en TSQL debería funcionar el segundo ejemplo.
select nombre, cantidad, cantidad/ (select sum(cantidad) "%" from cantidades)*100
from
cantidades c
select nombre, cantidad, cantidad /total *100 "%"
from
cantidades c, (select sum(cantidad) total from cantidades)total
Saludos
|