Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/07/2011, 14:27
alexg88
 
Fecha de Ingreso: abril-2011
Mensajes: 1.342
Antigüedad: 13 años
Puntos: 344
Respuesta: Como realizar la consula SQL

Muy sencillo:

Código MySQL:
Ver original
  1. SELECT centros.municipio, COUNT(centros.id) as total
  2. FROM alumnos INNER JOIN centros ON alumnos.centroid = centros.id
  3. GROUP BY centros.municipio