Tema: Consulta
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/04/2010, 14:08
Avatar de webness
webness
 
Fecha de Ingreso: enero-2009
Ubicación: BOGOTA
Mensajes: 312
Antigüedad: 15 años, 3 meses
Puntos: 5
Respuesta: Consulta

ENSAYA ESTO HABER SI TE FUNCIONA.

Código SQL:
Ver original
  1. SELECT  t1.municipio,COUNT(t2.id_munic),COUNT(t3.id_munic)
  2.     FROM     tabla t1, tabla t2, tabla t3
  3.     WHERE  t1.id = t2.id_munic AND
  4.                  t2.id = t3.id_viviend
  5.    GROPU BY municipio