un problemilla
Publicado por xeltar (1 intervención) el 01/11/2002 10:35:32
Necesito 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;
Valora esta pregunta


0