Ver Mensaje Individual
  #3 (permalink)  
Antiguo 04/09/2008, 10:32
Avatar de flaviovich
flaviovich
 
Fecha de Ingreso: agosto-2005
Ubicación: Lima, Peru
Mensajes: 2.951
Antigüedad: 18 años, 9 meses
Puntos: 39
Respuesta: CONTAR cod_Producto por MES

Cita:
select sum(case when MONTH(fecha_ingreso)=1 then 1 else 0 end) [ENERO],
sum(case when MONTH(fecha_ingreso)=2 then 1 else 0 end) [FEBRERO],
...
from producto
where YEAR(fecha_ingreso)=2008
__________________
No repitamos temas, usemos el Motor de busquedas
Plantea bien tu problema: Ayúdanos a ayudarte.