Ver Mensaje Individual
  #2 (permalink)  
Antiguo 10/11/2014, 09:27
Avatar de huesos52
huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 2 meses
Puntos: 360
Respuesta: consulta de agrupaciones

Prueba esto:

Código SQL:
Ver original
  1. SELECT SUBSTRING(codigo FROM 1 FOR 2), SUM(poblacion),SUM(edad) FROM demografia
  2. GROUP BY SUBSTRING(codigo FROM 1 FOR 2);
__________________
Without data, You are another person with an opinion.
W. Edwads Deming