Ver Mensaje Individual
  #3  
Antiguo 28-08-2013
adrall adrall is offline
Miembro
 
Registrado: ene 2007
Posts: 99
Reputación: 20
adrall Va por buen camino
Si te refieres al GROUP BY tambien lo puedo poner así.

Código SQL [-]
SELECT sum(importe) AS ventas_total, year(fecha)*100+month(fecha) AS x_mes FROM ventas GROUP BY x_mes
Responder Con Cita