Hola que tal, con permiso del administrador quisiera me pudieran asesorar sobre una consulta.
al realizar dicha consulta por ejemplo:
select clave,count(Clave) as TOTAL from LICENCIAS
where clave='1' and fechaInicio >= '2017' and fechaRetiro is null and Proceso >='2'
or clave='2' and fechaInicio >= '2017' and fechaRetiro is null and Proceso >='2'
or clave='3' and fechaInicio >= '2017' and fechaRetiro is null and Proceso >='2'
group by clave;
tengo el siguiente resultado:
clave TOTAL
------ ------
01 5
02 2
03 5
mi duda es como puedo hacer atra columna que me muestre el porcentaje de cada fila, respecto a TOTAL? muchas gracias.