Ver Mensaje Individual
  #4 (permalink)  
Antiguo 27/08/2014, 10:18
jurena
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Cáceres
Mensajes: 3.735
Antigüedad: 16 años, 1 mes
Puntos: 300
Respuesta: sumar totales de unos registros en particular

Código MySQL:
Ver original
  1. SELECT t1.kit, SUM(t1.cantidad) FROM (SELECT pedido, kit, cantidad FROM `kits` GROUP BY pedido, kit)t1 GROUP BY t1.kit