xeltar19 de Mayo del 2004
PreguntaNecesito especificar el continente con menos personas
Persona ( nombre, ciudad )
Ciudad ( ciudad, pais)
Pais ( pais, continente )
Continente ( continente )
Con esto encuentro cuantas personas hay en cada continente,
pero no se como buscar el continente con menos personas.
select P.continente as Continente, count (P.nombre) as cantidad
from Persona Per, Ciudad C, Pais P
where Per.ciudad = C.ciudad
and C.pais = P.pais
group by P.continente;
Persona ( nombre, ciudad )
Ciudad ( ciudad, pais)
Pais ( pais, continente )
Continente ( continente )
Con esto encuentro cuantas personas hay en cada continente,
pero no se como buscar el continente con menos personas.
select P.continente as Continente, count (P.nombre) as cantidad
from Persona Per, Ciudad C, Pais P
where Per.ciudad = C.ciudad
and C.pais = P.pais
group by P.continente;
