Ver Mensaje Individual
  #3 (permalink)  
Antiguo 03/10/2014, 07:29
plasma_go
 
Fecha de Ingreso: mayo-2014
Ubicación: Mexico
Mensajes: 79
Antigüedad: 10 años, 9 meses
Puntos: 2
Respuesta: Filtrar consulta por region

Cita:
Iniciado por gnzsoloyo Ver Mensaje
Código MySQL:
Ver original
  1. SELECT   rpe, COUNT (a.rpe) Total
  2.     FROM catusuario c LEFT JOIN agenda a ON c.rpe = a.rpe
  3.    WHERE     TRUE
  4.          AND c.regio = XXX
  5.       OR c.rpe IS NULL
  6. ORDER BY total ASC;
Gracias me sirvio perfectamente