Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/03/2016, 10:49
Avatar de Libras
Libras
Colaborador
 
Fecha de Ingreso: agosto-2006
Ubicación: En la hermosa perla de occidente
Mensajes: 7.412
Antigüedad: 17 años, 8 meses
Puntos: 774
Respuesta: Consulta sobre suma

Ya alguien en el foro pregunto por lo mismo.....


Código MySQL:
Ver original
  1. select max(total), idfechafactura from(
  2. Select sum(totalproducto) as total, idfechafactura from tblfactura
  3. group by idfechafactura
  4. ) as t1 group by idfechafactura
__________________
What does an execution plan say to t-sql query? Go f**k yourself, if you are not happy with me