Ver Mensaje Individual
  #4 (permalink)  
Antiguo 16/02/2012, 02:20
Avatar de repara2
repara2
 
Fecha de Ingreso: septiembre-2010
Ubicación: München
Mensajes: 2.445
Antigüedad: 13 años, 7 meses
Puntos: 331
Respuesta: consulta con SELECT COUNT() y como mostrar resultados

No puedo saberlo si no veo las tablas pero lo normal sería:
select COUNT(atributo) from sucursales where xx group by xxx having atributo = on

Si hay un having tiene que haber un group by. Having es el WHERE de las columnas agrupadas.
__________________
Fere libenter homines, id quod volunt, credunt.