QUE TAL AMIGOS NECESITO SU AYUDA PARA RESOLVER UN PROBLEMA
EL SIGUIENTE QUERY ME TRAE UN REPORTE POR MES DEL 2009 PERO ME LOS RESTA DE DICIEMBRE HACIA ABAJO QUISIERA SABER COMO HACERLO PARA QUE ME SUME LOS MESES Y ME MUESTRE MI REPORTE DE ENERO DEL 2010 DESPUES DE DICIEMBRE
Código PHP:
SELECT date_format( concat( year( slcr_activa_f ) , '-', month( slcr_activa_f ) , '-01' ) , '%b-%y') AS MES, count( * ) AS NO, sum( slcr_imp_solicitud ) AS COL
FROM orig25_crdnom WHERE slcr_activa_f > date_add( concat( year( sysdate( ) ) , '-', month( sysdate( ) ) , '-01' ) , INTERVAL -5 MONTH )
GROUP BY date_format( concat( year( slcr_activa_f ) , '-', month( slcr_activa_f ) , '-01' ) , '%b-%y' ) ORDER BY slcr_activa_f DESC