Buenas tardes,
Estoy creando una vista que me muestre ingreso y me lo divida entre el més actual.
He intentado varias formas que expongo, pero ninguna me ha funcionado:
select month(CURRENT_DATE) as mes, round(sum(quantity),2) as 'Ingreso_Anual_Actual', round('Ingreso_Anual_Actual'/ 'mes'),2) as 'Ingreso_Mensual_Neto' from recibos where operacion='ingreso' where YEAR(CURRENT_DATE);
select month(CURRENT_DATE) as mes, round(sum(quantity),2) as 'Ingreso_Anual_Actual', round(sum(quantity)/'mes'),2) as 'Ingreso_Mensual_Neto' from recibos where operacion='ingreso' where YEAR(CURRENT_DATE);
select round(sum(quantity),2) as 'Ingreso_Anual_Actual', round(sum(quantity)/month(CURRENT_DATE)),2) as 'Ingreso_Mensual_Neto' from recibos where operacion='ingreso' where YEAR(CURRENT_DATE);
Espero puedan ayudarme,
Saludos,