Professional Documents
Culture Documents
CICLISTAS
Luis Mengual
select nombre from ciclista where edad in (select min(edad) from ciclista);
select nombre,count(*) from ciclista,puerto where ciclista.dorsal=puerto.dorsal group by nombre having count(*)>1;
NOMBRE DE LOS CICLISTAS QUE NO HAN GANADO NINGUNA ETAPA select nombre from ciclista where dorsal not in(select dorsal from etapa);
CONSULTA N 6: CICLISTAS QUE HAN LLEVADO EL MISMO MAILLOT QUE MIGUEL INDURAIN
select nombre from ciclista,maillot,llevar where ciclista.dorsal=llevar.dorsal and llevar.codigo=maillot.codigo and maillot.codigo in(select maillot.codigo from ciclista,maillot,llevar where ciclista.dorsal=llevar.dorsal and llevar.codigo=maillot.codigo and nombre='Miguel Indurain');
select nombre from ciclista C1,maillot M1,llevar LL1 where C1.dorsal=LL1.dorsal and LL1.codigo=M1.codigo and M1.codigo in(select M2.codigo from ciclista C2,maillot M2,llevar LL2 where C2.dorsal=LL2.dorsal and LL2.codigo=M2.codigo and nombre='Miguel Indurain') and c1.dorsal<>1
select nombre from ciclista C1,maillot M1,llevar LL1 where C1.dorsal=LL1.dorsal and LL1.codigo=M1.codigo and c1.dorsal<>1 and M1.codigo in(select M2.codigo from ciclista C2,maillot M2,llevar LL2 where C2.dorsal=LL2.dorsal and LL2.codigo=M2.codigo and nombre='Miguel Indurain')